2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-03 16:07:00 +00:00

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.
This commit is contained in:
Markus Hilger
2026-07-27 16:22:00 +02:00
parent f5a90f3e35
commit 4d75c444ca
@@ -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')