Page MenuHomeVyOS Platform

bond: OS error thrown when two bonds use the same member
Closed, ResolvedPublicBUG

Description

Image version:    VyOS 1.3.0
Release train:    equuleus

Built by:         Sentrium S.L.
Built on:         Sun 19 Dec 2021 12:59 UTC
Build UUID:       ff458f8a-3ef7-453c-a7f9-4aeb6d03012e
Build commit ID:  2f691bb2f61e96-dirty

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    274413ad-2ec0-4691-9afd-361c5b011877

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 212, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-bonding.py", line 203, in apply
    b.update(bond)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bond.py", line 424, in update
    self.add_port(interface)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bond.py", line 284, in add_port
    ret = self.set_interface('bond_add_port', f'+{interface}')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 181, in set_interface
    return self._set_sysfs(self.config, name, value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 165, in _set_sysfs
    self._sysfs_set[name]['location'].format(**config), value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 130, in _write_sysfs
    write_file(filename, str(value))
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 222, in write_file
    raise e
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 216, in write_file
    bytes = f.write(data)
OSError: [Errno 16] Device or resource busy

Reproduce

[email protected]# show interfaces
 bonding bond10 {
     member {
         interface eth0
         interface eth1
     }
 }
+bonding bond15 {
+    member {
+        interface eth0
+        interface eth1
+    }
+    vif 15 {
+        address 192.168.15.11/24
+    }
+    vif 3949 {
+        address 100.64.113.41/27
+    }
+}

Details

Difficulty level
Normal (likely a few hours)
Version
1.3.0
Why the issue appeared?
Design mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Related Objects

Mentioned In
1.3.1

Event Timeline

c-po created this task.
c-po updated the task description. (Show Details)
c-po triaged this task as High priority.Feb 5 2022, 7:43 PM
c-po added a project: VyOS 1.4 Sagitta.
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Stricter validation to Perfectly compatible.
c-po changed the task status from Open to In progress.Feb 6 2022, 12:55 PM
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
c-po moved this task from Need Triage to 1.3.1 on the VyOS 1.3 Equuleus board.
c-po edited projects, added VyOS 1.3 Equuleus ( 1.3.1); removed VyOS 1.3 Equuleus.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus ( 1.3.1) board.