Bug 159500 - Bug in ifup script brings down bonding slaves
Bug in ifup script brings down bonding slaves
Status: CLOSED DUPLICATE of bug 432622
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts (Show other bugs)
4.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-02 22:12 EDT by Michael Brown
Modified: 2014-03-16 22:54 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-08 16:59:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
bond0 config (96 bytes, text/plain)
2005-06-02 22:12 EDT, Michael Brown
no flags Details
eth0 config (87 bytes, text/plain)
2005-06-02 22:13 EDT, Michael Brown
no flags Details

  None (edit)
Description Michael Brown 2005-06-02 22:12:07 EDT
+++ This bug was initially created as a clone of Bug #125954 +++

From Bugzilla Helper:
User-Agent: Opera/7.50 (X11; Linux i686; U)  [en]

Description of problem:
This bug has regressed - confirmed present in RHEL4 latest packages

When using network device bonding, the ifup script sets the link status of the
slave interfaces to be down. Line 201:
if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" -a \
     -x /sbin/ifenslave ]; then
    RFLAG="" ; [ "${RECEIVEONLY}" = yes ] && RFLAG="-r"

    /sbin/ip link set dev ${DEVICE} down
    echo $"Enslaving ${DEVICE} to ${MASTER}"
    ifenslave ${RFLAG} "${MASTER}" "${DEVICE}" >/dev/null 2>&1

    if [ -n "$ETHTOOL_OPTS" ] ; then
        /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
    fi

    exit 0
fi

Changing to:
    /sbin/ip link set dev ${DEVICE} up
makes everything work.

I'm attaching my configs for bond0 and a slave.

Version-Release number of selected component (if applicable):
initscripts-7.93.11.EL-1

How reproducible:
Always

Steps to Reproduce:
1. 'ifup bond0' 

Actual Results:  slave interfaces are brought down
Interestingly, eth0 ends up down, while eth1 and eth2 (unconnected) are up.

Expected Results:  slave interfaces brought up
Comment 1 Michael Brown 2005-06-02 22:12:07 EDT
Created attachment 115123 [details]
bond0 config
Comment 2 Michael Brown 2005-06-02 22:13:00 EDT
Created attachment 115124 [details]
eth0 config
Comment 5 Michael Brown 2005-06-24 11:26:36 EDT
Anybody out there? It's been 3 weeks since I reported this regression.
Comment 6 Bill Nottingham 2005-06-24 13:17:52 EDT
I couldn't reproduce it in brief testing here; need to try some more.
Comment 7 Michael Brown 2005-06-24 13:27:42 EDT
I've noticed odd behaviour - it only generates the abberrant behaviour on reboot.
Comment 8 Bill Nottingham 2005-09-21 17:07:52 EDT
On a hunch, what happens if you try the current beta hotplug & initscripts packages?

initscripts-7.93.20.EL-1
hotplug-2004_04_01-7.6
Comment 9 Trond H. Amundsen 2005-12-15 04:35:21 EST
We see this too. On a machine with two bonded interfaces (i.e. four real
devices) one of the real devices gets a down state. Running '/sbin/ip link set
dev eth0 up' sets its link status to up. The weird thing is that we only see
this on one of the four real devices, even though they are all slaves.

The relevant lines from modprobe.conf on this box:

alias eth0 e1000
alias eth1 e1000
alias eth2 tg3
alias eth3 tg3
install bond0 /sbin/modprobe -a eth1 eth3 && /sbin/modprobe bonding
alias bond0 bonding
install bond1 /sbin/modprobe -a eth0 eth2 && /sbin/modprobe bonding
alias bond1 bonding
options bonding mode=1 miimon=100 max_bonds=2

It's eth0 that gets its link state set to down.

One additional note: Failover to eth0 does not work unless we manually set its
link state to up.
Comment 10 Troels Arvin 2006-04-19 07:08:40 EDT
I had trouble somewhat resembling this bug's description. I didn't change any
scripts, but I adjusted the value of max_bonds to 4; this allowed me to have
four NICs in two bonds.
Comment 11 David Pippenger 2006-12-06 20:08:39 EST
I am also experiencing problems with bonding interfaces downing the slaves. The
error state is that both slave interfaces will remain in a link-down state until
networking is restarted. To produce this result a certain set of circumstances
must occur (which makes it hard to reproduce reliably). The circumstances as I
have observed are that the e1000 driver is loaded and ifup executes "/sbin/ip
link set dev ${DEVICE} down" *before* the interface is able to establish link to
the switch. If this happens then when the bonding driver is loaded and
interfaces are enslaved the physical interfaces never seem to get link
automatically and will remain down. This will only happen if you hard power
cycle the machine or pull the links from the switch, a warm reboot seems to
bypass the problem by not loosing link with the switch.

Workarounds...
If you execute an "ip set link dev blah up" the interfaces will immediately get
link. It's also possible to work around by putting a sleep in the ifup-local so
that the enslaved interfaces are able to get link on the switch prior to be
downed by the ifup script and enslaved. And one more workaround is to change "ip
link down" to "ip link up" in the ifup script as the bug sumbitter suggested.

--Dave P.
Comment 13 Bill Nottingham 2008-07-03 14:44:00 EDT
This sounds very similar to 432622. Does the fix there work for you?
Comment 14 Bill Nottingham 2008-12-08 16:59:21 EST

*** This bug has been marked as a duplicate of bug 432622 ***

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