[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-419-g3c21f5b

Ronnie Sahlberg sahlberg at samba.org
Sun May 8 16:08:31 MDT 2011


The branch, 1.2 has been updated
       via  3c21f5b6d7ba2d993c279bb75d37c46d1994ba6d (commit)
      from  426ed1d560745282ee647d40ce43d662c8bc5594 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.2


- Log -----------------------------------------------------------------
commit 3c21f5b6d7ba2d993c279bb75d37c46d1994ba6d
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 9 06:35:33 2011 +1000

    Remove logging of spam/errors from the 10.interfrace
    script if/when we have for example NATGW configured but no public addresses defined on that interface
    
    CQ S1023378

-----------------------------------------------------------------------

Summary of changes:
 config/events.d/10.interface |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index e0689c4..81eff51 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -13,7 +13,6 @@ loadconfig
 }
 
 [ ! -f "$CTDB_PUBLIC_ADDRESSES" ] && {
-	echo "No public addresses file found. Nothing to do for 10.interfaces"
 	exit 0
 }
 
@@ -54,25 +53,25 @@ monitor_interfaces()
 		grep -q 'Currently Active Slave: None' /proc/net/bonding/$REALIFACE && {
 			echo "ERROR: No active slaves for bond device $REALIFACE"
 			fail=1
-			ctdb setifacelink $IFACE down
+			ctdb setifacelink $IFACE down >/dev/null 2>/dev/null
 			continue;
 		}
 		grep -q '^MII Status: up' /proc/net/bonding/$REALIFACE || {
 			echo "ERROR: public network interface $REALIFACE is down"
 			fail=1
-			ctdb setifacelink $IFACE down
+			ctdb setifacelink $IFACE down >/dev/null 2>/dev/null
 			continue;
 		}
 		grep -q '^Bonding Mode: IEEE 802.3ad Dynamic link aggregation' /proc/net/bonding/$REALIFACE && {
 			grep 'MII Status:' /proc/net/bonding/$REALIFACE | tail -n +2 | grep -q '^MII Status: up' || {
 				echo No active slaves for 802.ad bond device $REALIFACE
-				ctdb setifacelink $IFACE down
+				ctdb setifacelink $IFACE down >/dev/null 2>/dev/null
 				fail=1
 				continue
 			}
 		}
 		ok=1 # we only set ok for interfaces known to ctdbd
-		ctdb setifacelink $IFACE up
+		ctdb setifacelink $IFACE up >/dev/null 2>/dev/null
 		continue;
 	    }
 
@@ -80,12 +79,12 @@ monitor_interfaces()
 	    lo*)
 		# loopback is always working
 		ok=1 # we only set ok for interfaces known to ctdbd
-		ctdb setifacelink $IFACE up
+		ctdb setifacelink $IFACE up >/dev/null 2>/dev/null
 		;;
 	    ib*)
 		# we dont know how to test ib links
 		ok=1 # we only set ok for interfaces known to ctdbd
-		ctdb setifacelink $IFACE up
+		ctdb setifacelink $IFACE up >/dev/null 2>/dev/null
 		;;
 	    *)
 		[ -z "$IFACE" ] || {
@@ -99,12 +98,12 @@ monitor_interfaces()
 			ethtool $IFACE | grep -q 'Link detected: yes' || {
 			    echo "ERROR: No link on the public network interface $IFACE"
 			    fail=1
-			    ctdb setifacelink $IFACE down
+			    ctdb setifacelink $IFACE down >/dev/null 2>/dev/null
 			    continue
 			}
 		    }
 		    ok=1 # we only set ok for interfaces known to ctdbd
-		    ctdb setifacelink $IFACE up
+		    ctdb setifacelink $IFACE up >/dev/null 2>/dev/null
 		}
 		;;
 	    esac
@@ -141,7 +140,7 @@ case "$1" in
 	INTERFACES=`for IFACE in $INTERFACES ; do echo $IFACE ; done | sort | uniq`
 
 	for IFACE in $INTERFACES ; do
-		ctdb setifacelink $IFACE down
+		ctdb setifacelink $IFACE down >/dev/null 2>/dev/null
 	done
 	
 	monitor_interfaces


-- 
CTDB repository


More information about the samba-cvs mailing list