summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-08-19 21:48:04 +1000
committerKarolin Seeger <kseeger@samba.org>2019-08-28 09:12:17 +0000
commita9d0e0b7bae9005d56222e5952f9fec66cb8f491 (patch)
tree8435ad295472905e0120d4a45506513ae897247b /ctdb
parentf454db8d960bce78e492cdec344257a2ee094514 (diff)
downloadsamba-a9d0e0b7bae9005d56222e5952f9fec66cb8f491.tar.gz
ctdb-daemon: Make node inactive in the NODE_STOP control
Currently some of this is supported by a periodic check in the recovery daemon's main_loop(), which notices the flag change, sets recovery mode active and freezes databases. If STOP_NODE returns immediately then the associated recovery can complete and the node can be continued before databases are actually frozen. Instead, immediately do all of the things that make a node inactive. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 RN: Stop "ctdb stop" from completing before freezing databases Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Aug 20 08:32:27 UTC 2019 on sn-devel-184 (cherry picked from commit e9f2e205ee89f4f3d6302cc11b4d0eb2efaf0f53)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_recover.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c
index df60a4cb9c0..1654c6d3978 100644
--- a/ctdb/server/ctdb_recover.c
+++ b/ctdb/server/ctdb_recover.c
@@ -1469,6 +1469,8 @@ int32_t ctdb_control_stop_node(struct ctdb_context *ctdb)
DEBUG(DEBUG_ERR, ("Stopping node\n"));
ctdb->nodes[ctdb->pnn]->flags |= NODE_FLAGS_STOPPED;
+ ctdb_node_become_inactive(ctdb);
+
return 0;
}