[SCM] CTDB repository - branch master updated - ctdb-2.0-2-gf243a91

Amitay Isaacs amitay at samba.org
Tue Nov 13 16:56:43 MST 2012

The branch, master has been updated
       via  f243a916ee71013f7402b9c396c2ead88eb3aab0 (commit)
      from  5f58c811127a89f162b6a41ddcd6e944801740a5 (commit)


- Log -----------------------------------------------------------------
commit f243a916ee71013f7402b9c396c2ead88eb3aab0
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Nov 14 10:37:15 2012 +1100

    Eventscripts: 10.interface startup event should only process interfaces once
    Provided that monitor_interfaces() sets the state of each interface,
    there's no need to mark all interfaces as up before running
    monitor_interfaces() in the startup event.  monitor_interfaces() will
    set the true status of each interface anyway.  The duplication is
    unnecessary and may cause extra action in the recovery daemon because
    the state of some interfaces is changed an extra time.
    Instead, add a comment at the top of the loop in monitor_interfaces()
    to warn against early loop exits.
    Signed-off-by: Martin Schwenke <martin at meltin.net>


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

Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index dd54f1e..80b1368 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -56,6 +56,10 @@ monitor_interfaces()
+	# Note that this loop must not exit early.  It must process
+	# all interfaces so that the correct state for each interface
+	# is set in CTDB using mark_up/mark_down.  If there is a
+	# problem with an interface then set fail=true and continue.
 	for iface in $all_interfaces ; do
 	    ip addr show $iface 2>/dev/null >/dev/null || {
@@ -149,14 +153,7 @@ case "$1" in
      # called after ctdbd has done its initial recovery
      # and we start the services to become healthy
-	# Assume all links are good initially
-	get_all_interfaces
-	for iface in $all_interfaces ; do
-		ctdb setifacelink $iface up >/dev/null 2>/dev/null
-	done

CTDB repository

More information about the samba-cvs mailing list