2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-27 19:37:57 +00:00

Fix cause of former 'login process died'

If a session died without calling logged, the confluent plugin
instance would be orphaned.  Detect this situation to trigger a
retry.
This commit is contained in:
Jarrod Johnson 2019-07-01 09:05:08 -04:00
parent 65b4cbe8cc
commit 54439d5f18

View File

@ -467,6 +467,7 @@ class IpmiHandler(object):
persistent_ipmicmds[(node, tenant)].ipmi_session.broken):
try:
persistent_ipmicmds[(node, tenant)].close_confluent()
persistent_ipmicmds[(node, tenant)].ipmi_session._mark_broken()
except KeyError: # was no previous session
pass
try:
@ -478,7 +479,7 @@ class IpmiHandler(object):
ipmisess = persistent_ipmicmds[(node, tenant)].ipmi_session
begin = util.monotonic_time()
while ((not (self.broken or self.loggedin)) and
while ((not (ipmisess.broken or self.loggedin)) and
(util.monotonic_time() - begin) < 30):
ipmisess.wait_for_rsp(31 - (util.monotonic_time() - begin))
if self.broken or self.loggedin: