From 459c9a5210401683cb6834aaffbfd99316740b20 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 12 May 2022 16:39:58 -0400 Subject: [PATCH] Wait for a login attempt to run its course If an existing session was not quite logged in, but may be getting there, join in and wait for result instead of starting over again. --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index b2e5615c..b5220791 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -482,7 +482,7 @@ class IpmiHandler(object): self.tenant = cfg.tenant tenant = cfg.tenant while ((node, tenant) not in persistent_ipmicmds or - not persistent_ipmicmds[(node, tenant)].ipmi_session.logged or + not (persistent_ipmicmds[(node, tenant)].ipmi_session.logged or persistent_ipmicmds[(node, tenant)].ipmi_session.logging) or persistent_ipmicmds[(node, tenant)].ipmi_session.broken): try: persistent_ipmicmds[(node, tenant)].close_confluent() @@ -514,6 +514,8 @@ class IpmiHandler(object): raise exc.TargetEndpointUnreachable(ge.strerror) raise self.ipmicmd = persistent_ipmicmds[(node, tenant)] + while not self.ipmicmd.ipmi_session.broken and not self.ipmicmd.ipmi_session.logged: + self.ipmicmd.ipmi_session.wait_for_rsp(3) bootdevices = { 'optical': 'cd'