Description of problem: I have a bonding interface with two slave interface(eth2, eth3). the configuration file such below: ####snip begin#### /etc/sysconfig/network-scripts/ifcfg-bond0: DEVICE=bond0 IPADDR=10.182.114.117 NETMASK=255.255.252.0 NETWORK=10.182.112.0 BROADCAST=10.182.115.255 ONBOOT=yes BOOTPROTO=none TYPE=Ethernet /etc/sysconfig/network-scripts/ifcfg-eth2: DEVICE=eth2 ONBOOT=yes BOOTPROTO=dhcp HWADDR=00:16:3e:2d:92:f4 MASTER=bond0 SLAVE=yes TYPE=Ethernet PEERDNS=yes USERCTL=no IPV6INIT=no /etc/sysconfig/network-scripts/ifcfg-eth3: DEVICE=eth3 ONBOOT=yes BOOTPROTO=dhcp HWADDR=00:16:3e:2d:93:f1 MASTER=bond0 SLAVE=yes TYPE=Ethernet PEERDNS=yes USERCTL=no IPV6INIT=no the related part in /etc/modprobe.conf: alias bond0 bonding options bond0 downdelay=200 updelay=200 miimon=100 mode=4 alias eth2 8139cp alias eth3 8139cp ####snip end#### If bond0, eth2 and eth3 is enabled, run /sbin/ifup eth2 will disable eth2, the same with eth3 Version-Release number of selected component (if applicable): 8.45.19.EL Steps to Reproduce: 1. configure the bonding interface and the slave interface 2. enable boding interface 3. /sbin/ifup slave interface Actual results: running /sbin/ifconfig, find out the slave interface was disabled. Expected results: the slave interface is enabled.
In the scripts /etc/sysconfig/network-scripts/ifup-eth, it use /sbin/ip to disable the slave interface(eth2 or eth3), then attach the interface to the bonding interface(bond0), but, slave eth0 is already enslaved! so kernel wouldn't do anything for it(now,the interface is disabled). this patch will resolve it. --- initscripts-8.45.19.EL/sysconfig/network-scripts/ifup-eth.orig 2008-09-12 15:19:12.000000000 +0800 +++ initscripts-8.45.19.EL/sysconfig/network-scripts/ifup-eth 2008-09-12 15:57:57.000000000 +0800 @@ -105,6 +105,14 @@ # slave device? if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then + if LC_ALL=C grep "${DEVICE}" /sys/class/net/${MASTER}/bonding/slaves > /dev/null 2>&1 ; then + if /sbin/ip -o link show up ${DEVICE} | grep UP > /dev/null 2>&1; then + exit 0 + fi + echo "-${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null + sleep 2 + fi + /sbin/ip link set dev ${DEVICE} down echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null
*** This bug has been marked as a duplicate of bug 440077 ***
Sorry I could not check bug 440077, is the patch like below? --- a/sysconfig/network-scripts/ifup-eth 2008-03-12 05:48:05.000000000 +0800 +++ b/sysconfig/network-scripts/ifup-eth 2008-04-04 23:40:30.000000000 +0800 @@ -117,9 +117,10 @@ # slave device? if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then - /sbin/ip link set dev ${DEVICE} down - echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null - + grep -wq "${DEVICE}" /sys/class/net/${MASTER}/bonding/slaves || { + /sbin/ip link set dev ${DEVICE} down + echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null + } if [ -n "$ETHTOOL_OPTS" ] ; then /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS fi If yes, I have checked the latest initscripts and found the patch have merged, but the patch could not solved the bug, with Jason's patch would solved the bug. Would you please add me to CC list of bug 440077? Thanks.
It's essentially like that, yes.