[ofa-general] RH 5.3 : ifup-ib does not setup connected mode on slaves

Sumeet Lahorani sumeet.lahorani at oracle.com
Wed Jul 1 14:26:49 PDT 2009


Hi,

I'm running into a problem with ifup-ib on RH 5.3. I've setup a bonded 
interfaces over 2 ports of a HCA as follows

# cat ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.33.219
NETMASK=255.255.254.0
NETWORK=192.168.32.0
BROADCAST=192.168.33.255
BONDING_OPTS="mode=active-backup miimon=100 downdelay=5000 updelay=5000"
IPV6INIT=no
MTU=65520

# cat ifcfg-ib1
DEVICE=ib1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HOTPLUG=no
CONNECTED_MODE=yes
MTU=65520

# cat ifcfg-ib0
DEVICE=ib0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HOTPLUG=no
CONNECTED_MODE=yes
MTU=65520

When the network service comes up, it executes ifup-ib to bring up ib0 & 
ib1. However, this script has the following which causes it to exit 
before it configures these interfaces to run in connected mode.

     69 # slave device?
     70 if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" 
]; then
     71     /sbin/ip link set dev ${DEVICE} down
     72     echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 
2>/dev/n        ull
     73
     74     if [ -n "$ETHTOOL_OPTS" ] ; then
     75         /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
     76     fi
     77
     78     exit 0
     79 fi
...
    120 # We have to set connected mode before we set the MTU since 
connected mo        de
    121 # changes our maximum allowed MTU
    122 if [ "${CONNECTED_MODE}" = yes -a -e 
/sys/class/net/${DEVICE}/mode ]; th        en
    123     echo connected > /sys/class/net/${DEVICE}/mode
    124 fi
    125   
    126 if [ -n "${MTU}" ]; then
    127    ip link set dev ${DEVICE} mtu ${MTU}
    128 fi

Is this a bug or is there a different way to bond together 2 connected 
mode interfaces?

# rpm -qf /etc/sysconfig/network-scripts/ifup-ib
openib-1.3.2-0.20080728.0355.3.el5

- Sumeet




More information about the general mailing list