[SCM] CTDB repository - branch master updated - ctdb-1.10-186-ga6930ce

Ronnie Sahlberg sahlberg at samba.org
Tue Apr 12 17:04:42 MDT 2011


The branch, master has been updated
       via  a6930cec6d9503dba18b9d4839d87a1c1a8ddba2 (commit)
       via  2e80d53b73fcba58ed5a72bab66c051691ccf719 (commit)
      from  4ab63d2a7262aff30d5eced184c294c9c9dd4974 (commit)

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


- Log -----------------------------------------------------------------
commit a6930cec6d9503dba18b9d4839d87a1c1a8ddba2
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Apr 13 07:51:36 2011 +1000

    bonding mode 4 monitoring:
    we can not just check if MII Status is up for bonding mode 4, since the kernel will always report the bond device as UP
    even if all cables are disconneccted.
    
    For mode 4, ignore the status of the bond device and instead chek if at least one slave interface is up
    when determining if the device is good or bad

commit 2e80d53b73fcba58ed5a72bab66c051691ccf719
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Apr 12 05:24:43 2011 +1000

    If the eventscript is finished but state->ctdb is NULL,
    log an error and return.
    
    (Need to find root cause for this is soo too.)

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

Summary of changes:
 config/events.d/10.interface |    8 ++++++++
 server/eventscript.c         |    5 +++++
 2 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index 2ca8eae..e0689c4 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -63,6 +63,14 @@ monitor_interfaces()
 			ctdb setifacelink $IFACE down
 			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
+				fail=1
+				continue
+			}
+		}
 		ok=1 # we only set ok for interfaces known to ctdbd
 		ctdb setifacelink $IFACE up
 		continue;
diff --git a/server/eventscript.c b/server/eventscript.c
index 9ba3a5d..0967c00 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -448,6 +448,11 @@ static void ctdb_event_script_handler(struct event_context *ev, struct fd_event
 	struct ctdb_context *ctdb = state->ctdb;
 	int r, status;
 
+	if (ctdb == NULL) {
+		DEBUG(DEBUG_ERR,("Eventscript finished but ctdb is NULL\n"));
+		return;
+	}
+
 	r = read(state->fd[0], &current->status, sizeof(current->status));
 	if (r < 0) {
 		current->status = -errno;


-- 
CTDB repository


More information about the samba-cvs mailing list