2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-08-30 14:58:15 +00:00

Wait for redfish account service to be ready before modifying users

If an XCC is booting, it may appear before it's ready to use redfish to manage user accounts.  Handle this by delaying the discovery until
the service is ready.
This commit is contained in:
Jarrod Johnson
2025-08-15 10:18:49 -04:00
parent 580c451945
commit e7606e69bd

View File

@@ -477,6 +477,13 @@ class NodeHandler(immhandler.NodeHandler):
tmpaccount = None
while status != 200:
tries -= 1
rsp, status = wc.grab_json_response_with_status(
'/redfish/v1/AccountService/Accounts/{0}'.format(uid))
if status >= 500:
if tries < 0:
raise Exception('Redfish account management failure')
eventlet.sleep(30)
continue
rsp, status = wc.grab_json_response_with_status(
'/redfish/v1/AccountService/Accounts/{0}'.format(uid),
{'UserName': username}, method='PATCH')