Skip to content

Commit

Permalink
Don't trigger the cluster split handler when a node is lost because o…
Browse files Browse the repository at this point in the history
…f a shutdown

Not need to risk suicide to avoid double starting a service : the shutdown
implies the remote instances are down.
  • Loading branch information
cvaroqui committed Sep 5, 2018
1 parent 46efd5a commit 81e1c33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/osvcd_shared.py
Expand Up @@ -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",
{
Expand All @@ -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):
"""
Expand Down

0 comments on commit 81e1c33

Please sign in to comment.