2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-31 05:17:39 +00:00

Fix error on long apply phase

Some firmware takes a long time
to apply. Add token refresh to avoid the session
going bad during apply phase.

Change-Id: I9b40cb608adc235d49865a94bf4aef98ca0ac1bc
This commit is contained in:
Jarrod Johnson 2021-02-24 13:31:33 -05:00
parent fb7c211983
commit cfceabaf78
2 changed files with 2 additions and 0 deletions

View File

@ -1928,6 +1928,7 @@ class XCCClient(IMMClient):
raise Exception('Unexpected result starting update: %s' % errmsg)
complete = False
while not complete:
self._refresh_token()
ipmisession.Session.pause(3)
rsp = self.wc.grab_json_response(
'/api/dataset/imm_firmware_progress')

View File

@ -876,6 +876,7 @@ class OEMHandler(generic.OEMHandler):
raise Exception('Unexpected result starting update: %s' % errmsg)
complete = False
while not complete:
self._refresh_token()
time.sleep(3)
rsp = self.wc.grab_json_response(
'/api/dataset/imm_firmware_progress')