From c5f831e58921403eb95d8285146b904607c3f368 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Sat, 15 Aug 2026 13:46:18 +0200 Subject: [PATCH] Start the bmc reset grace when the bmc actually goes The deadline was set when monitoring began, so a flash that kept answering for longer than the grace period had already spent it by the time the reboot it covers arrived, and reported a working update as a failure. --- confluent_server/aiohmi/redfish/oem/generic.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/confluent_server/aiohmi/redfish/oem/generic.py b/confluent_server/aiohmi/redfish/oem/generic.py index 66a50ff0..279c30d1 100644 --- a/confluent_server/aiohmi/redfish/oem/generic.py +++ b/confluent_server/aiohmi/redfish/oem/generic.py @@ -1620,9 +1620,11 @@ class OEMHandler(object): # watching, away for minutes. That is the update working, not the # monitoring failing, so wait it out and take the bmc coming back # with the task gone as the update having landed. + expectsreset = getattr(self, '_updateresetsbmc', False) + # Started when the bmc actually goes, not now: a flash that keeps + # answering for longer than the grace period would otherwise have + # spent it all before the reboot it is meant to cover. deadline = None - if getattr(self, '_updateresetsbmc', False): - deadline = time.monotonic() + self._resetgracetime wentaway = False while not complete and retry > 0: try: @@ -1630,8 +1632,10 @@ class OEMHandler(object): except (socket.timeout, exc.PyghmiException, OSError): pgress = None if not pgress: - if deadline is not None: - if time.monotonic() > deadline: + if expectsreset: + if deadline is None: + deadline = time.monotonic() + self._resetgracetime + elif time.monotonic() > deadline: raise Exception( 'The bmc did not finish applying its firmware ' 'within {0} seconds'.format(