From: Martin Schwenke Date: Thu, 13 Jun 2019 14:23:22 +0000 (+1000) Subject: ctdb-recoverd: Do not fetch the nodemap from the recovery master X-Git-Tag: samba-4.11.14~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1956ee1f6b8d03aad37300e318af7b5aea5e11ff;p=thirdparty%2Fsamba.git ctdb-recoverd: Do not fetch the nodemap from the recovery master The nodemap has already been fetched from the local node and is actually passed to this function. Care must be taken to avoid referencing the "remote" nodemap for the recovery master. It also isn't useful to do so, since it would be the same nodemap. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit d50919b0cb28f299c9b6985271b29d4f27c5f619) --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 92bb9413b88..138177a9187 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -2288,7 +2288,7 @@ static int get_remote_nodemaps(struct ctdb_recoverd *rec, return -1; } - nodes = list_of_connected_nodes(ctdb, rec->nodemap, mem_ctx, true); + nodes = list_of_connected_nodes(ctdb, rec->nodemap, mem_ctx, false); state.remote_nodemaps = t; state.rec = rec; @@ -2641,6 +2641,9 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, /* verify that all other nodes have the same nodemap as we have */ for (j=0; jnum; j++) { + if (nodemap->nodes[j].pnn == ctdb->pnn) { + continue; + } if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { continue; } @@ -2677,6 +2680,9 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, * up-to-date information for all the nodes. */ for (j=0; jnum; j++) { + if (nodemap->nodes[j].pnn == ctdb->pnn) { + continue; + } if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { continue; } @@ -2684,6 +2690,9 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, } for (j=0; jnum; j++) { + if (nodemap->nodes[j].pnn == ctdb->pnn) { + continue; + } if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { continue; }