From 6576c25f77f09f0dd948168ab150e946e1b16e86 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 14 Aug 2026 17:42:37 +0200 Subject: [PATCH] Require a bmc to have gone away before an update counts as applied A bmc that keeps answering while the task read fails is a fault, not the update landing. --- confluent_server/aiohmi/redfish/oem/generic.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/confluent_server/aiohmi/redfish/oem/generic.py b/confluent_server/aiohmi/redfish/oem/generic.py index b52bf56f..483cd998 100644 --- a/confluent_server/aiohmi/redfish/oem/generic.py +++ b/confluent_server/aiohmi/redfish/oem/generic.py @@ -1586,6 +1586,7 @@ class OEMHandler(object): deadline = None if getattr(self, '_updateresetsbmc', False): deadline = time.monotonic() + self._resetgracetime + wentaway = False while not complete and retry > 0: try: pgress = await self._do_web_request(monitorurl, cache=False) @@ -1595,11 +1596,17 @@ class OEMHandler(object): if deadline is not None: if time.monotonic() > deadline: raise Exception( - 'The bmc did not return within {0} seconds of ' - 'starting to apply its firmware'.format( + 'The bmc did not finish applying its firmware ' + 'within {0} seconds'.format( self._resetgracetime)) await asyncio.sleep(10) - if await self._bmc_is_back(): + if not await self._bmc_is_back(): + # Going away is what taking the update looks like, + # so only a bmc that went away can come back with + # it applied. Losing the task while it answers is + # a fault, reported at the deadline. + wentaway = True + elif wentaway: progress({'phase': phase, 'progress': 100.0}) return 'pending' continue