]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
when starting a new election, also force all nodes into recovery mode so
authorRonnie Sahlberg <sahlberg@ronnie>
Wed, 9 May 2007 23:48:14 +0000 (09:48 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Wed, 9 May 2007 23:48:14 +0000 (09:48 +1000)
there is no internode traffic to interfere with our election

(This used to be ctdb commit ccfb67a076c72a0e7f2b6dc5fce9c19f652ba2ad)

ctdb/direct/ctdb_recoverd.c

index 00214d030d8a1beb7ac1254f8ca37539aaf6c6b7..947f47b29fe871f634c8a5185fd0949629af8354 100644 (file)
@@ -549,6 +549,13 @@ static void election_handler(struct ctdb_context *ctdb, uint64_t srvid,
 static void force_election(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, uint32_t vnn, struct ctdb_node_map *nodemap)
 {
        int ret;
+
+       /* set all nodes to recovery mode to stop all internode traffic */
+       ret = set_recovery_mode(ctdb, nodemap, CTDB_RECOVERY_ACTIVE);
+       if (ret!=0) {
+               DEBUG(0, (__location__ "Unable to set recovery mode to active on cluster\n"));
+               return;
+       }
        
        ret = send_election_request(ctdb, mem_ctx, vnn);
        if (ret!=0) {