From 81e1c33190bf5edc6c965bf0f92097ef7d4bcd3b Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Wed, 5 Sep 2018 17:23:47 +0200 Subject: [PATCH] Don't trigger the cluster split handler when a node is lost because of a shutdown Not need to risk suicide to avoid double starting a service : the shutdown implies the remote instances are down. --- lib/osvcd_shared.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/osvcd_shared.py b/lib/osvcd_shared.py index 2fab9a5dba..a8a42066c6 100644 --- a/lib/osvcd_shared.py +++ b/lib/osvcd_shared.py @@ -678,6 +678,7 @@ def forget_peer_data(self, nodename, change=False): nodename, nmon.status, time.time()-nmon.status_updated, self.maintenance_grace_period) return + nmon_status = nmon.status self.event( "forget_peer", { @@ -700,7 +701,11 @@ def forget_peer_data(self, nodename, change=False): except KeyError: pass wake_monitor(reason="forget node %s data" % nodename) - self.split_handler() + if nmon_status == "shutting": + self.log.info("cluster is not split, the lost node %s last known " + "monitor state is '%s'", nodename, nmon_status) + else: + self.split_handler() def peer_down(self, nodename): """