This breaks the build since the recovery loop is different in master
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 29 Nov 2011 03:38:02 +0000 (14:38 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 29 Nov 2011 03:38:02 +0000 (14:38 +1100)
compared to old 1.0 branches
This must have been mistakenly applied to master when you intended to push
for a different branch i guess.

Revert "recoverd: try to become the recovery master if we have the capability, but the current master doesn't"

This reverts commit a97d417aba85e901540147a4dff4794249442939.

(This used to be ctdb commit c19cb751077b78cf4b6e28a1e3746d4ffedbfd68)

ctdb/server/ctdb_recoverd.c

index 36abfd4d21371e4553bf557ab30813158a026ed9..fa4b6ba882a63c489a437b48942aa80e21eb01ad 100644 (file)
@@ -3010,13 +3010,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
        }
        nodemap = rec->nodemap;
 
-       /* update the capabilities for all nodes */
-       ret = update_capabilities(ctdb, nodemap);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR, (__location__ " Unable to update node capabilities.\n"));
-               goto again;
-       }
-
        /* check which node is the recovery master */
        ret = ctdb_ctrl_getrecmaster(ctdb, mem_ctx, CONTROL_TIMEOUT(), pnn, &rec->recmaster);
        if (ret != 0) {
@@ -3039,6 +3032,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                return;
        }
 
+
        /* if the local daemon is STOPPED, we verify that the databases are
           also frozen and thet the recmode is set to active 
        */
@@ -3073,21 +3067,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                return;
        }
        
-       /*
-        * if the current recmaster do not have CTDB_CAP_RECMASTER,
-        * but we have force an election and try to become the new
-        * recmaster
-        */
-       if ((rec->ctdb->nodes[rec->recmaster]->capabilities & CTDB_CAP_RECMASTER) == 0 &&
-           (rec->ctdb->capabilities & CTDB_CAP_RECMASTER) &&
-            !(nodemap->nodes[pnn].flags & NODE_FLAGS_INACTIVE)) {
-               DEBUG(DEBUG_ERR, (__location__ " Current recmaster node %u does not have CAP_RECMASTER,"
-                                 " but we (node %u) have - force an election\n",
-                                 rec->recmaster, pnn));
-               force_election(rec, pnn, nodemap);
-               goto again;
-       }
-
        /* check that we (recovery daemon) and the local ctdb daemon
           agrees on whether we are banned or not
        */