Page MenuHomeVyOS Platform

Bond VLANs can't be extended on the fly
Closed, ResolvedPublicBUG

Description

Creating a new Bond interface from scratch works like a charm but adding a VIF once the bond is already established leads to an OSError exception.

[ interfaces bonding bond0 ]
DEBUG/bond0  write '0' > '/sys/class/net/bond0/bonding/miimon'
DEBUG/bond0  read '' < '/sys/class/net/bond0/bonding/arp_ip_target'
DEBUG/bond0  write 'sdfasdf' > '/sys/class/net/bond0/ifalias'
DEBUG/bond0  write '1' > '/proc/sys/net/ipv4/conf/bond0/link_filter'
DEBUG/bond0  write 'layer2' > '/sys/class/net/bond0/bonding/xmit_hash_policy'
DEBUG/bond0  write '30000' > '/proc/sys/net/ipv4/neigh/bond0/base_reachable_time_ms'
DEBUG/bond0  write '1' > '/proc/sys/net/ipv4/conf/bond0/arp_filter'
DEBUG/bond0  write '0' > '/proc/sys/net/ipv4/conf/bond0/arp_accept'
DEBUG/bond0  write '0' > '/proc/sys/net/ipv4/conf/bond0/arp_announce'
DEBUG/bond0  write '0' > '/proc/sys/net/ipv4/conf/bond0/arp_ignore'
DEBUG/bond0  write '0' > '/proc/sys/net/ipv4/conf/bond0/proxy_arp'
DEBUG/bond0  write '0' > '/proc/sys/net/ipv4/conf/bond0/proxy_arp_pvlan'
DEBUG/bond0  write '1500' > '/sys/class/net/bond0/mtu'
DEBUG/bond0  cmd 'ip link set dev bond0 down'
DEBUG/eth2   cmd 'ip link set dev eth2 down'
DEBUG/bond0  write '+eth2' > '/sys/class/net/bond0/bonding/slaves'
OSError: [Errno 16] Device or resource busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-bonding.py", line 511, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-bonding.py", line 457, in apply
    b.add_port(intf)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig.py", line 1519, in add_port
    .format(self._ifname), '+' + interface)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig.py", line 153, in _write_sysfs
    f.write(str(value))
OSError: [Errno 16] Device or resource busy

[[interfaces bonding bond0]] failed
Commit failed

Problem is somehow related to the solution implemented in T2030.

Details

Difficulty level
Easy (less than an hour)
Version
1.3-rolling-202002150217
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po created this task.
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.
c-po moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.
c-po moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 5:39 PM