From e7606e69bdf7c6744d4ffa3afc94e366554ac3fe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 15 Aug 2025 10:18:49 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/discovery/handlers/xcc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index 77535ce3..23a6c437 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -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')