[SCM] CTDB repository - branch master updated - ctdb-1.0.108-3-g8cc6c5d
Ronnie Sahlberg
sahlberg at samba.org
Tue Dec 8 17:35:12 MST 2009
The branch, master has been updated
via 8cc6c5de3d7abb0b72eaa6e769e70963b02d84cb (commit)
via 03b5bbaae1b53830a4cd20d3079ab8f45ffce923 (commit)
from 7b73834ba3ac197cc8a3020c111f9bb2c567e70b (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8cc6c5de3d7abb0b72eaa6e769e70963b02d84cb
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Dec 9 11:33:04 2009 +1100
Bond devices can have any name the user configures, so
when checking link status for an interface, first
check if this interface is in fact a bond device
(by the precense of a /proc/net/bonding/IFACE file)
and use that file for checking status.
Othervise assume ib* is an infiniband interface which we donnt know how
to check, or otherwise it is an ethernet interface and ethtool should
hopefully work.
commit 03b5bbaae1b53830a4cd20d3079ab8f45ffce923
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Dec 9 11:13:29 2009 +1100
make sure to also check that interfaces used for NATGW are ok
and have a link.
if not the node should become unhealthy
-----------------------------------------------------------------------
Summary of changes:
config/events.d/10.interface | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index e24cc36..f881808 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -137,22 +137,28 @@ case "$1" in
sed -e "s/^[^\t ]*[\t ]*//" -e "s/[\t ]*$//"`
[ "$CTDB_PUBLIC_INTERFACE" ] && INTERFACES="$CTDB_PUBLIC_INTERFACE $INTERFACES"
+ [ "$CTDB_NATGW_PUBLIC_IFACE" ] && INTERFACES="$CTDB_NATGW_PUBLIC_IFACE $INTERFACES"
INTERFACES=`for IFACE in $INTERFACES ; do echo $IFACE ; done | sort | uniq`
for IFACE in $INTERFACES ; do
- 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"
+ # These interfaces are sometimes bond devices
+ # When we use VLANs for bond interfaces, there will only
+ # be an entry in /proc for the underlying real interface
+ REALIFACE=`echo $IFACE |sed -e 's/\..*$//'`
+ [ -f /proc/net/bonding/$REALIFACE ] && {
+ grep -q 'Currently Active Slave: None' /proc/net/bonding/$REALIFACE && {
+ echo "ERROR: No active slaves for bond device $REALIFACE"
exit 1
}
- grep -q '^MII Status: up' /proc/net/bonding/$IFACE || {
- echo "ERROR: public network interface $IFACE is down"
+ grep -q '^MII Status: up' /proc/net/bonding/$REALIFACE || {
+ echo "ERROR: public network interface $REALIFACE is down"
exit 1
}
- ;;
+ exit 0;
+ }
+
+ case $IFACE in
ib*)
# we dont know how to test ib links
;;
--
CTDB repository
More information about the samba-cvs
mailing list