The bonding rc script tries to set the slaves and primary before is up, which results in the following error message: /lib64/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted Also the primary slave will not be set as configured. Reproducible: Always Steps to Reproduce: 1. Configure a bond in /etc/conf.d/net: config_bond0="192.168.127.1/32" mode_bond0="active-backup" miimon_bond0="100" slaves_bond0="eth2" primary_bond0="eth2" 2. sysfs has to be mounted 3. Start bond: /etc/init.d/net.bond0 start Actual Results: Outout is: * Bringing up interface bond0 /lib/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted /lib/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted * Adding slaves to bond0 ... * eth2 [ ok ] * 192.168.127.1/32 ... [ ok ] Primary is not set: # cat /sys/class/net/bond0/bonding/primary Expected Results: No error messages. Primary should be set in /sys/class/net/bond0/bonding/primary
Created attachment 242373 [details, diff] Solve bonding problems with slaves and primary The solution is quiet simple: - put content from slaves_${IFVAR} and primary_${IFVAR} into local variables - unset slaves_${IFVAR} and primary_${IFVAR} to have them not written to sysfs in line 48 - handle primary (if set) on its own before other slaves
I've check this and it looks good. A slightly modified version of this patch will be in the next version bump. Thanks.
(In reply to comment #2) > I've check this and it looks good. A slightly modified version of this patch > will be in the next version bump. Thanks. > Closing as it is already commited in our overlay, please check next release which will happen later this week to ensure problem is resolved, as always if it is not please reopen the bug.