[ewg] [PATCH] ofed_1.2: Add automatic operation of ib-bonding
Moni Shoua
monisonlists at gmail.com
Thu Apr 26 03:36:43 PDT 2007
Load ib-bonding when OFED starts and unload it when OFED stops
Signed-off-by: Moni Shoua <monis at voltaire.com>
---
diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index b6e5cbd..d04d9c3 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -795,6 +795,22 @@ start()
fi
ipoib_ha_pid=$!
echo ${ipoib_ha_pid} > ${ipoib_ha_pidfile}
+ elif [ "X${IPOIBBOND_ENABLE}" == "Xyes" ]; then
+ if [ ! -z $IPOIB_BONDS ]; then
+ for bond in $(echo $IPOIB_BONDS|tr , " ") ; do
+ eval bond_ip=\$${bond}_IP
+ if [ -z $bond_ip ]; then
+ echo No IP address defined for $bond
+ continue
+ fi
+ eval bond_slaves=\$${bond}_SLAVES
+ if [ -z $bond_slaves ]; then
+ echo No slaves defined for $bond
+ continue
+ fi
+ ib-bond --bond-name $bond --bond-ip $bond_ip --slaves $bond_slaves
+ done
+ fi
fi
fi
@@ -1045,6 +1061,9 @@ stop()
fi
fi
+ # Down all bond interfaces
+ ib-bond --stop-all
+
# Stop SRP HA daemon if running
if [ -f $srp_daemon_pidfile ]; then
local line p
More information about the ewg
mailing list