Page MenuHomeVyOS Platform

Commit fails on adding disabled interface to bridge
Closed, ResolvedPublic

Description

[ interfaces bridge br0 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-bridge.py", line 374, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-bridge.py", line 340, in apply
    br.add_port(member['name'])
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bridge.py", line 178, in add_port
    return self.set_interface('add_port', interface)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 147, in set_interface
    return self._set_command(self.config, name, value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 75, in _set_command
    return self._command_set[name].get('format', lambda _: _)(self._cmd(cmd))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 44, in _cmd
    raise OSError(code, f'{command}\nreturned: {decoded}')
FileNotFoundError: [Errno 2] ip link set dev wlan0 master br0
returned: RTNETLINK answers: Invalid argument

[[interfaces bridge br0]] failed
Commit failed

br0 member interface wlan0 is configured, but disabled.

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202003291001
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

jjakob triaged this task as Unbreak Now! priority.Mar 29 2020, 2:49 PM
jjakob created this task.
jjakob created this object in space S1 VyOS Public.

With ethernet works fine, VyOS 1.3-rolling-202007230117

vyos@r1-roll:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.122.11/24                 u/u  
eth1             -                                 A/D

Commit without problems.

vyos@r1-roll# set interfaces bridge br0 member interface eth1
[edit]
vyos@r1-roll# commit
vyos@r1-roll# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
br0              -                                 A/D  
eth0             192.168.122.11/24                 u/u  
eth1             -                                 A/D

@jjakob can you check it with "wlan0" ?

This is expected as disabling an ethernet interface is different than any other interface, they're still present but just put admin down. All other interfaces get deleted and thus throw this error.

I'm not at the machine to test this right now but I consider T2650 the only correct way to fix this. My reasoning is described in that task. That's why I'm not putting any more work into the current bridge code as I consider it basically flawed in design.

erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 7:58 AM
erkin removed a subscriber: Active contributors.