Page MenuHomeVyOS Platform

VLAN: error on commit if main interface is disabled
Closed, ResolvedPublicBUG


Create VLAN interfaces

set interfaces ethernet eth1 vif 5 address ''
set interfaces ethernet eth1 vif 5 address '2001:db8:0:::ffff/64'
set interfaces ethernet eth1 vif 10 address ''
set interfaces ethernet eth1 vif 10 address '2001:db8:1:ffff/64'

Disable pyhsical interface

set interfaces ethernet eth1 disable
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/", line 437, in <module>
  File "/usr/libexec/vyos/conf_mode/", line 428, in apply
    apply_vlan_config(vlan, vif)
  File "/usr/lib/python3/dist-packages/vyos/", line 77, in apply_vlan_config
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 557, in set_admin_state
    return self.set_interface('admin_state', state)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 154, in set_interface
    return self._set_command(self.config, name, value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 82, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmd(cmd))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 48, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/", line 139, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip link set dev eth0.5 up
exit code: 2


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

c-po created this task.Apr 23 2020, 5:05 PM
pasik added a subscriber: pasik.Apr 24 2020, 6:06 AM
jjakob added subscribers: thomas-mangin, jjakob.

@thomas-mangin there was a bug in PR #383 that prevented bond interfaces from coming up - it thought the members had addresses assigned, but they didn't. Something in my PR#384 fixed it - I'm not exactly sure what - probably assigning the intf['intf'] in get_intf_from_dict or fixing the _basename function. There is still a bug with IPv6 link-locals that worked fine before - I'll see if it's easy to track down, if not I'll open a new task for it.

jjakob added a comment.May 5 2020, 9:10 AM

Why do we need to remove all addresses from the interface when it is disabled? That causes a commit error on dhcp:

vyos@vyos# set service dhcp-server disable 
vyos@vyos# commit
vyos@vyos# delet service dhcp-server disable 
vyos@vyos# commit
[ service dhcp-server ]
DHCP server configuration error!
None of configured DHCP subnets does not have appropriate
primary IP address on any broadcast interface.

[[service dhcp-server]] failed
Commit failed

Also the running service logs errors, but dhcpd seems to handle them gracefully and doesn't die:
vyos dhcpd[7765]: receive_packet failed on bond0: Network is down

If you agree, I'll change it back to the way it was when disable just sets the interface admin down.

Why do we need to remove all addresses from the interface when it is disabled?

It was a misunderstanding on my side of what disable should do.

jjakob added a comment.May 9 2020, 9:04 AM

Since the issue is resolved can this be closed?

thomas-mangin closed this task as Resolved.May 10 2020, 9:26 AM
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.May 21 2020, 5:21 PM