Page MenuHomeVyOS Platform

Bonding interface permission errors with custom ethernet MTU
Needs testing, NormalPublicBUG

Description

Bonding interface permission errors with custom ethernet MTU
To reproduce:

set interfaces ethernet eth3 mtu 9000
set interfaces bonding bond1 member interface eth3
commit

commit:

vyos@r14# commit
[ interfaces ethernet eth3 ]

WARNING: Cannot apply "mtu" to "9000". Interface "eth3" is a bond
member. Option is inherited from bond "bond1"


[ interfaces bonding bond1 ]
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 157, in run_script
    script.apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces_bonding.py", line 290, in apply
    b.update(bond)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bond.py", line 507, in update
    self.add_port(interface)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bond.py", line 313, in add_port
    ret = self.set_interface('bond_add_port', f'+{interface}')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 195, in set_interface
    return self._set_sysfs(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 178, in _set_sysfs
    commited = self._write_sysfs(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 144, in _write_sysfs
    write_file(filename, str(value))
  File "/usr/lib/python3/dist-packages/vyos/utils/file.py", line 81, in write_file
    raise e
  File "/usr/lib/python3/dist-packages/vyos/utils/file.py", line 70, in write_file
    with open(fname, 'w' if not append else 'a') as f:
PermissionError: [Errno 1] Operation not permitted

[[interfaces bonding bond1]] failed
Commit failed
[edit]
vyos@r14#

Details

Version
VyOS 2026.03.12-0023-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

natali-rs1985 changed the task status from Open to In progress.Apr 27 2026, 1:47 PM
natali-rs1985 claimed this task.
natali-rs1985 changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.

Is it still reproducible? From my testing — no:

vyos@r10# set interfaces ethernet eth3 mtu 9000
[edit]
vyos@r10# set interfaces bonding bond1 member interface eth3
[edit]
vyos@r10# commit
[ interfaces ethernet eth3 ]

WARNING: Cannot apply "mtu" to "9000". Interface "eth3" is a bond
member. Option is inherited from bond "bond1"


[edit]
vyos@r10# run show version 
Version:          VyOS 2026.04.13-0034-rolling
Release train:    current
Release flavor:   generic

Built by:         autobuild@vyos.net
Built on:         Mon 13 Apr 2026 00:35 UTC
Build UUID:       95b0ad8b-7557-4f4f-8567-c07d4b5070b5
Build commit ID:  4d26859088b146

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest
Secure Boot:      n/a (BIOS)

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:     
Hardware UUID:    62ffea09-f309-425c-b73d-815cf1c21f1e

Copyright:        VyOS maintainers and contributors
[edit]

The bug still exists

vyos@r14# set interfaces ethernet eth3 mtu 9000
[edit]
vyos@r14# set interfaces bonding bond1 member interface eth3
[edit]
vyos@r14# commit
[ interfaces ethernet eth3 ]

WARNING: Cannot apply "mtu" to "9000". Interface "eth3" is a bond
member. Option is inherited from bond "bond1"


[ interfaces bonding bond1 ]
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 157, in run_script
    script.apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces_bonding.py", line 299, in apply
    b.update(bond)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bond.py", line 507, in update
    self.add_port(interface)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/bond.py", line 313, in add_port
    ret = self.set_interface('bond_add_port', f'+{interface}')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 195, in set_interface
    return self._set_sysfs(self.config, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 178, in _set_sysfs
    commited = self._write_sysfs(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 144, in _write_sysfs
    write_file(filename, str(value))
  File "/usr/lib/python3/dist-packages/vyos/utils/file.py", line 81, in write_file
    raise e
  File "/usr/lib/python3/dist-packages/vyos/utils/file.py", line 70, in write_file
    with open(fname, 'w' if not append else 'a') as f:
PermissionError: [Errno 1] Operation not permitted

[[interfaces bonding bond1]] failed
Commit failed
[edit]
vyos@r14# 
[edit]
vyos@r14# run show ver
Version:          VyOS 2026.04.28-0040-rolling
Release train:    current
Release flavor:   generic

Built by:         autobuild@vyos.net
Built on:         Tue 28 Apr 2026 00:40 UTC
Build UUID:       c828eafa-9840-4729-8891-a0382a08ee09
Build commit ID:  d1bfa067311a6f

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest
Secure Boot:      n/a (BIOS)

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    ec976809-bb5a-4769-8630-72652c43c101

Copyright:        VyOS maintainers and contributors
[edit]
vyos@r14#

I clarified exactly how this problem reproduces itself. When accel-pppd is running adding an interface to a Linux bond fails with PermissionError: [Errno 1] Operation not permitted. If change the order and configure bonding interface and then pppoe-server service it works fine.

set service pppoe-server access-concentrator PPPoE-Server
set service pppoe-server authentication mode local
set service pppoe-server authentication local-users username test password 'test'
set service pppoe-server client-ip-pool PPPOE-POOL range 192.168.255.2-192.168.255.254
set service pppoe-server default-pool 'PPPOE-POOL'
set service pppoe-server gateway-address 192.168.255.1
set service pppoe-server interface eth0
commit
set interfaces bonding bond1 member interface eth3
commit
...
[[interfaces bonding bond1]] failed
Commit failed

ss -f netlink -p -a -e while accel-pppd is running:

...
UNCONN 960    0    rtnl:accel-pppd/3071    *    sk=0 cb=0 groups=0x00000000
UNCONN 0      0    genl:accel-pppd/3071    *    sk=0 cb=0 groups=0x00004000
...

I guess accel-pppd holds a NETLINK_ROUTE (rtnl) socket with 960 bytes permanently sitting unread in the receive buffer. This value never changes - it is present from startup and remains constant regardless of activity.

Possibly accel-pppd sent a netlink request on this socket at startup but never called recv() to consume the response. The stale, unread response causes the kernel to return EPERM when another process attempts to perform interface operations (bond enslavement) on the network interfaces.

o.kuchmystyi changed the task status from In progress to On hold.May 29 2026, 1:38 PM
Viacheslav changed the task status from On hold to Needs testing.Aug 11 2026, 2:19 PM
Viacheslav lowered the priority of this task from High to Normal.