The branch, 1.2 has been updated
       via  dcbb31f9fa9a59c2a795cf48d1adf90a47421ba2 (commit)
       via  b259c9db48fc1ad99a65d63fb04451f837a9af56 (commit)
      from  671eff3ccf1914de110909b9eb5d7844c8aebb3b (commit)

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


- Log -----------------------------------------------------------------
commit dcbb31f9fa9a59c2a795cf48d1adf90a47421ba2
Author: Ronnie Sahlberg <ronniesahlb...@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 b259c9db48fc1ad99a65d63fb04451f837a9af56
Author: Ronnie Sahlberg <ronniesahlb...@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

Reply via email to