summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-06-14 00:23:22 +1000
committerStefan Metzmacher <metze@samba.org>2020-08-27 10:48:08 +0000
commit7fe088809585285aaed835a622d92ebb2dec7406 (patch)
treee7ac93f7da78897e60e2bfe289d60241c4913410 /ctdb
parent48ca1987350683b58c9bd43cd54ea9e2614da337 (diff)
downloadsamba-7fe088809585285aaed835a622d92ebb2dec7406.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit d50919b0cb28f299c9b6985271b29d4f27c5f619)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_recoverd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 0cdaab75878..2b01c897f3d 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; j<nodemap->num; 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; j<nodemap->num; 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; j<nodemap->num; j++) {
+ if (nodemap->nodes[j].pnn == ctdb->pnn) {
+ continue;
+ }
if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) {
continue;
}