2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-12 10:49:17 +00:00

Assure that get_health always updates inhealth

If an unforseen circumstance occurs while trying to get health,
make sure we recognize that scenario.
This commit is contained in:
Jarrod Johnson 2016-04-12 14:16:15 -04:00
parent d4357c6984
commit 0672666e42

View File

@ -123,7 +123,11 @@ class IpmiCommandWrapper(ipmicommand.Command):
eventlet.sleep(0.1)
return self._lasthealth
self._inhealth = True
self._lasthealth = super(IpmiCommandWrapper, self).get_health()
try:
self._lasthealth = super(IpmiCommandWrapper, self).get_health()
except Exception:
self._inhealth = False
raise
self._inhealth = False
return self._lasthealth