ctdb-recoverd: Do not sanity check recovery master with local daemon
authorMartin Schwenke <martin@meltin.net>
Fri, 23 Oct 2015 04:05:08 +0000 (15:05 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 16 Nov 2015 07:42:12 +0000 (08:42 +0100)
Each recovery daemon knows who the recmaster is and is in sync with
its local daemon.  The recovery master is running this check so do not
bother checking with its local daemon - both agree that it is the
recovery master.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c

index 579747638303d74cf18c43e25daf55c64b60bdd6..56886b9206f35f256176e75eda20c54077323b18 100644 (file)
@@ -3049,9 +3049,12 @@ static enum monitor_result verify_recmaster(struct ctdb_recoverd *rec, struct ct
        rmdata->pnn    = pnn;
        rmdata->status = MONITOR_OK;
 
-       /* loop over all active nodes and send an async getrecmaster call to 
+       /* loop over all active nodes and send an async getrecmaster call to
           them*/
        for (j=0; j<nodemap->num; j++) {
+               if (nodemap->nodes[j].pnn == rec->recmaster) {
+                       continue;
+               }
                if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) {
                        continue;
                }