Bug 237076 - cannot set primary for bonded interfaces with new sysfs configuration
cannot set primary for bonded interfaces with new sysfs configuration
Status: CLOSED DUPLICATE of bug 236897
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-19 07:01 EDT by Bryn M. Reeves
Modified: 2014-03-16 23:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-19 13:01:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch adding a PRIMARY parameter to ifup-eth (600 bytes, patch)
2007-04-19 07:05 EDT, Bryn M. Reeves
no flags Details | Diff

  None (edit)
Description Bryn M. Reeves 2007-04-19 07:01:30 EDT
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 07:05:13 EDT
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 13:01:57 EDT

*** This bug has been marked as a duplicate of 236897 ***
Comment 3 Bryn M. Reeves 2007-04-19 13:09:04 EDT
Darn. I searched for this on Tuesday, and the guy who filed the other bug sits
next to me - sorry for the noise.

Note You need to log in before you can comment on or make changes to this bug.