Description of problem: The bonding driver has moved to using sysfs to configure bonding properties. In previous RHEL releases, it was possible to configure the primary interface using a module option in /etc/modprobe.conf, e.g.: options bond0 primary=eth0 mode=0 miimon=100 Initscripts now provides a BONDING_OPTS parameter to pass options to the module but this no longer works as the interface has not been enslaved at the time the option is processed: bonding: bond0: Unable to set eth0 as primary slave as it is not a slave This can be worked around by echoing the primary device into sysfs from rc.local or another script: echo "eth0" > /sys/class/net/bond0/bonding/primary Version-Release number of selected component (if applicable): initscripts-8.45.14.EL-1 How reproducible: 100% Steps to Reproduce: 1. Configure a bonded interface with "primary=ethN" in BONDING_OPTS, where ethN is one of the members of the bond 2. Start the interface via ifup 3. check dmesg Actual results: bonding: bond0: Unable to set eth0 as primary slave as it is not a slave Expected results: bond0 sets ethN as primary Additional info: It seems straightforward to add this as a parameter for bonded devices, something like: /etc/sysconfig/network-scripts/ifcfg-eth2: # Intel Corporation 82571EB Gigabit Ethernet Controller DEVICE=eth2 HWADDR=00:15:17:1C:31:12 ONBOOT=no MASTER=bond1 SLAVE=yes PRIMARY=yes /etc/sysconfig/network-scripts/ifcfg-eth3: # Intel Corporation 82571EB Gigabit Ethernet Controller DEVICE=eth3 HWADDR=00:15:17:1C:31:13 ONBOOT=yes MASTER=bond1 SLAVE=yes PRIMARY=no
Created attachment 152990 [details] patch adding a PRIMARY parameter to ifup-eth This patch adds a PRIMARY parameter to ifup-eth. It's been tested and works OK; I'm a bit unsure if there needs to be something to clear the primary on ifdown, although the kernel seems to do the right thing anyway.
*** This bug has been marked as a duplicate of 236897 ***
Darn. I searched for this on Tuesday, and the guy who filed the other bug sits next to me - sorry for the noise.