summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Colmer <philip.colmer@linaro.org>2014-01-22 13:50:18 +0000
committerPhilip Colmer <philip.colmer@linaro.org>2014-01-22 13:50:18 +0000
commitad5258a65558d5673610b752f875c8c773c12262 (patch)
treed4928e5ed0a7d8d79826d83c4902a32bfa0f13b0
parente33d37f0f95d56eebda8fa57a5260cdf0997d5c8 (diff)
downloadlinaro-healthcheck-ad5258a65558d5673610b752f875c8c773c12262.tar.gz
More fixes to hc script and upstart script.
-rw-r--r--healthcheck.py3
-rw-r--r--linaro-healthcheck.conf2
2 files changed, 5 insertions, 0 deletions
diff --git a/healthcheck.py b/healthcheck.py
index 4cab2a4..44115d7 100644
--- a/healthcheck.py
+++ b/healthcheck.py
@@ -87,6 +87,9 @@ class HealthCheck(object):
else:
self.logmsg("Active node has changed and we aren't healthy; switching to Failed")
new_state = States.Failed
+ elif (self.last_state == States.Passive):
+ # We're on the passive node, we were passive and we're still passive
+ new_state = States.Passive
else:
self.logmsg("IP address has changed with uncaught state of %s" % str(self.last_state))
else:
diff --git a/linaro-healthcheck.conf b/linaro-healthcheck.conf
index cf5e1e1..c4434f0 100644
--- a/linaro-healthcheck.conf
+++ b/linaro-healthcheck.conf
@@ -6,6 +6,8 @@ stop on runlevel [!2345]
pre-start script
# Stop job from continuing if no fqdn file
[ ! -f /opt/linaro-healthcheck/fqdn ] && exit 1
+
+ exit 0
end script
expect daemon