From c915f2e5d5f313c923be8e6d73a7f81c05a830ba Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 5 Nov 2009 12:12:06 +1100 Subject: add an extra test for the bond devices and check that there is an active slave. this to handle the case where all links do have a physical layer, but where all slaves have been disabled using ifdown (This used to be ctdb commit bf50709630df000583f2b0ef0edc177c01d60eaf) --- ctdb/config/events.d/10.interface | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ctdb') diff --git a/ctdb/config/events.d/10.interface b/ctdb/config/events.d/10.interface index 61f7148236..9a02b15fd9 100755 --- a/ctdb/config/events.d/10.interface +++ b/ctdb/config/events.d/10.interface @@ -147,6 +147,10 @@ case $cmd in case $IFACE in ethX*|bond*) IFACE=`echo $IFACE |sed -e 's/\....$//'` + grep -q 'Currently Active Slave: None' /proc/net/bonding/$IFACE && { + echo "ERROR: No active slaves for bond device $IFACE" + exit 1 + } grep -q '^MII Status: up' /proc/net/bonding/$IFACE || { echo "ERROR: public network interface $IFACE is down" exit 1 -- cgit