From 4d75c444cae20280f902510c9f795877b117b26b Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 27 Jul 2026 16:22:00 +0200 Subject: [PATCH] Ride out a transient bad status while firmware applies The poll loop spends its retry budget on a poll that goes unanswered but aborted the update on the first non-200, even though an SMM restarting its web service part way through the apply keeps answering, with whatever its httpd has to say, before it stops answering at all. Give a bad status the same budget as a dead connection. --- confluent_server/aiohmi/ipmi/oem/lenovo/nextscale.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/confluent_server/aiohmi/ipmi/oem/lenovo/nextscale.py b/confluent_server/aiohmi/ipmi/oem/lenovo/nextscale.py index 33c29762..b40bbaf3 100644 --- a/confluent_server/aiohmi/ipmi/oem/lenovo/nextscale.py +++ b/confluent_server/aiohmi/ipmi/oem/lenovo/nextscale.py @@ -1030,9 +1030,16 @@ class SMMClient(object): raise tries += 1 continue - tries = 0 if status != 200: - raise Exception('Error applying firmware') + # an SMM restarting its web service part way through the + # apply answers for a while before it stops answering at + # all, so spend the same budget on this as on a poll that + # went unanswered + if tries > 2: + raise Exception('Error applying firmware') + tries += 1 + continue + tries = 0 progdata = fromstring(progdata) if progdata.findall('fwUpdate')[0].text == 'invalid signature': raise Exception('Firmware signature invalid')