recoverd: No need to check if node is recovery master when inactive
authorAmitay Isaacs <amitay@gmail.com>
Thu, 27 Jun 2013 05:46:04 +0000 (15:46 +1000)
committerMichael Adam <obnox@samba.org>
Mon, 26 Aug 2013 11:35:53 +0000 (13:35 +0200)
If a node is stopped or banned, it will cause early return from the
main_loop, so this check is redundent.  The election will called by an
active node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 815ddd3341b7e9db39e05a3a3fcd9a1420f053bc)

server/ctdb_recoverd.c

index a7d2423850f6c83ba552d8adc625743dbe0c1187..27d69a75604d93ffdfdf5d2e66f74c5aab1704ec 100644 (file)
@@ -3018,15 +3018,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                return;
        }
 
-       /* If the local node is stopped, verify we are not the recmaster 
-          and yield this role if so
-       */
-       if ((nodemap->nodes[pnn].flags & NODE_FLAGS_INACTIVE) && (rec->recmaster == pnn)) {
-               DEBUG(DEBUG_ERR,("Local node is INACTIVE. Yielding recmaster role\n"));
-               force_election(rec, pnn, nodemap);
-               return;
-       }
-       
        /*
         * if the current recmaster do not have CTDB_CAP_RECMASTER,
         * but we have force an election and try to become the new