|Summary:||cannot set primary for bonded interfaces with new sysfs configuration|
|Product:||Red Hat Enterprise Linux 5||Reporter:||Bryn M. Reeves <bmr>|
|Component:||initscripts||Assignee:||Bill Nottingham <notting>|
|Status:||CLOSED DUPLICATE||QA Contact:||Brock Organ <borgan>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-04-19 17:01:57 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Bryn M. Reeves 2007-04-19 11:01:30 UTC
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
Comment 1 Bryn M. Reeves 2007-04-19 11:05:13 UTC
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.
Comment 2 Bill Nottingham 2007-04-19 17:01:57 UTC
*** This bug has been marked as a duplicate of 236897 ***
Comment 3 Bryn M. Reeves 2007-04-19 17:09:04 UTC
Darn. I searched for this on Tuesday, and the guy who filed the other bug sits next to me - sorry for the noise.