The branch, master has been updated
       via  8903b858ddd3a016d9cf765187839814443a67ca (commit)
      from  f76132b0d555e52ee0a379ec2c156350b37b0280 (commit)

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


- Log -----------------------------------------------------------------
commit 8903b858ddd3a016d9cf765187839814443a67ca
Author: Ronnie Sahlberg <[email protected]>
Date:   Wed Sep 9 10:57:39 2009 +1000

    dont force an election just because the ban flag differs across the cluster.
    a simple push to resync this flag is sufficient

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

Summary of changes:
 server/ctdb_recoverd.c |   18 ------------------
 server/eventscript.c   |    8 +++++++-
 2 files changed, 7 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index 7a4f6c5..860d501 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -883,15 +883,6 @@ static int update_local_flags(struct ctdb_recoverd *rec, 
struct ctdb_node_map *n
                        return MONITOR_FAILED;
                }
                if (nodemap->nodes[j].flags != remote_nodemap->nodes[j].flags) {
-                       int ban_changed = (nodemap->nodes[j].flags ^ 
remote_nodemap->nodes[j].flags) & NODE_FLAGS_BANNED;
-
-                       if (ban_changed) {
-                               DEBUG(DEBUG_NOTICE,("Remote node %u had 
different BANNED flags 0x%x, local had 0x%x - trigger a re-election\n",
-                               nodemap->nodes[j].pnn,
-                               remote_nodemap->nodes[j].flags,
-                               nodemap->nodes[j].flags));
-                       }
-
                        /* We should tell our daemon about this so it
                           updates its flags or else we will log the same 
                           message again in the next iteration of recovery.
@@ -911,15 +902,6 @@ static int update_local_flags(struct ctdb_recoverd *rec, 
struct ctdb_node_map *n
                                 nodemap->nodes[j].pnn, 
remote_nodemap->nodes[j].flags,
                                 nodemap->nodes[j].flags));
                        nodemap->nodes[j].flags = 
remote_nodemap->nodes[j].flags;
-
-                       /* If the BANNED flag has changed for the node
-                          this is a good reason to do a new election.
-                        */
-                       if (ban_changed) {
-                               talloc_free(mem_ctx);
-                               return MONITOR_ELECTION_NEEDED;
-                       }
-
                }
                talloc_free(remote_nodemap);
        }
diff --git a/server/eventscript.c b/server/eventscript.c
index ce9229d..1f77bf1 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -616,6 +616,8 @@ static void ctdb_event_script_handler(struct event_context 
*ev, struct fd_event
 
        read(state->fd[0], &rt, sizeof(rt));
 
+       DEBUG(DEBUG_INFO,(__location__ " Eventscript %s finished with state 
%d\n", state->options, rt));
+
        talloc_set_destructor(state, NULL);
        talloc_free(state);
        callback(ctdb, rt, private_data);
@@ -733,6 +735,8 @@ static int ctdb_event_script_callback_v(struct ctdb_context 
*ctdb,
        state->private_data = private_data;
        state->options = talloc_vasprintf(state, fmt, ap);
        CTDB_NO_MEMORY(ctdb, state->options);
+
+       DEBUG(DEBUG_INFO,(__location__ " Starting eventscript %s\n", 
state->options));
        
        ret = pipe(state->fd);
        if (ret != 0) {
@@ -828,7 +832,9 @@ int ctdb_event_script(struct ctdb_context *ctdb, const char 
*fmt, ...)
        struct callback_status status;
 
        va_start(ap, fmt);
-       ret = ctdb_event_script_callback_v(ctdb, timeval_zero(), tmp_ctx, 
event_script_callback, &status, fmt, ap);
+       ret = ctdb_event_script_callback_v(ctdb, 
+                       timeval_current_ofs(ctdb->tunable.script_timeout, 0),
+                       tmp_ctx, event_script_callback, &status, fmt, ap);
        va_end(ap);
 
        if (ret != 0) {


-- 
CTDB repository

Reply via email to