Revert "ctdb-daemon: Don't explicitly stop monitoring during shutdown"
authorMartin Schwenke <martin@meltin.net>
Mon, 18 Sep 2017 06:36:32 +0000 (16:36 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 18 Sep 2017 23:28:13 +0000 (01:28 +0200)
This reverts commit 19318d28354190a9cfafa1696e41c90351f85af9.

With this commit, a shutdown that occurs while the startup event is
running can cause an abort because the startup callback will try to
decrease the run state from SHUTDOWN to RUNNING.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_daemon.c

index 6a9547075dea16c497b318926b318cb0281cb073..8ae43517a8563ea99e084f525e991b76bde9ef3c 100644 (file)
@@ -1800,6 +1800,7 @@ void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code)
        ctdb_set_runstate(ctdb, CTDB_RUNSTATE_SHUTDOWN);
        ctdb_stop_recoverd(ctdb);
        ctdb_stop_keepalive(ctdb);
+       ctdb_stop_monitoring(ctdb);
        ctdb_release_all_ips(ctdb);
        ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
        ctdb_stop_eventd(ctdb);