summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-06-14 00:23:22 +1000
committerAmitay Isaacs <amitay@samba.org>2020-08-18 05:02:25 +0000
commitd50919b0cb28f299c9b6985271b29d4f27c5f619 (patch)
tree5d926241ecc70ad8ed2cffa4db786eee41a84fc6 /ctdb
parent762d1d8a9605f97973a2c1176de5d29fcc61d15a (diff)
downloadsamba-d50919b0cb28f299c9b6985271b29d4f27c5f619.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>
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;
}