ctdb-daemon: Ignore flag changes for disconnected nodes
authorMartin Schwenke <martin@meltin.net>
Tue, 27 Jul 2021 05:50:54 +0000 (15:50 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 9 Sep 2021 01:46:49 +0000 (01:46 +0000)
If this node is not connected to a node then we shouldn't know
anything about it.  The state will be pushed later by the recovery
master.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_monitor.c

index 913e2721f98c47609fb96194d26966183cd86eb2..ab58ec485fe0bfb04de99b55434434358350b348 100644 (file)
@@ -471,6 +471,11 @@ int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata)
                return -1;
        }
 
+       if (node->flags & NODE_FLAGS_DISCONNECTED) {
+               DBG_DEBUG("Ignoring flag changes for disconnected node\n");
+               return 0;
+       }
+
        /*
         * Remember the old flags.  We don't care what some other node
         * thought the old flags were - that's irrelevant.