Bug 237076 - cannot set primary for bonded interfaces with new sysfs configuration
Summary: cannot set primary for bonded interfaces with new sysfs configuration
Keywords:
Status: CLOSED DUPLICATE of bug 236897
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-19 11:01 UTC by Bryn M. Reeves
Modified: 2014-03-17 03:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-19 17:01:57 UTC
Target Upstream Version:
Embargoed:


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

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.


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