diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-11-05 12:12:06 +1100 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-11-05 12:12:06 +1100 |
commit | c915f2e5d5f313c923be8e6d73a7f81c05a830ba (patch) | |
tree | b7026ff8899f9e410610f2a42a23f6badaab24e0 /ctdb | |
parent | 2501638e158292bc30c69d7622b86a036c16df71 (diff) | |
download | samba-c915f2e5d5f313c923be8e6d73a7f81c05a830ba.tar.gz samba-c915f2e5d5f313c923be8e6d73a7f81c05a830ba.tar.xz samba-c915f2e5d5f313c923be8e6d73a7f81c05a830ba.zip |
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)
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/config/events.d/10.interface | 4 |
1 files changed, 4 insertions, 0 deletions
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 |