From 9b6114f5233165eba8094546923580886d71bb1f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 26 May 2022 15:01:47 -0400 Subject: [PATCH] Break if stuck in loop for over a minute --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index b5220791..99b94021 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -514,8 +514,11 @@ class IpmiHandler(object): raise exc.TargetEndpointUnreachable(ge.strerror) raise self.ipmicmd = persistent_ipmicmds[(node, tenant)] + giveup = util._monotonic_time() + 60 while not self.ipmicmd.ipmi_session.broken and not self.ipmicmd.ipmi_session.logged: self.ipmicmd.ipmi_session.wait_for_rsp(3) + if util._monotonic_time() > giveup: + self.ipmicmd.ipmi_session.broken = True bootdevices = { 'optical': 'cd'