Increase timeout for sync controller API call

To address timeouts during large patch sync operations,
added a constant `TIMEOUT_SYNC_API_CALL` with a value of 120
seconds. This constant is used in the `call_api` method for
syncing controllers.

Test Plan:
PASS Verify no timeout while software sync with duplex
     subcloud

Closes-Bug: 2091149
Change-Id: If453d13f76825e497b70e3ba6574cf216cb3ddd0
Signed-off-by: rummadis <ramu.ummadishetty@windriver.com>
This commit is contained in:
rummadis
2024-12-04 02:43:03 -05:00
parent aa95d5f181
commit c2a7f24d61
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -40,7 +40,11 @@ def main():
api_cmd = usm_endpoint + "/deploy/software_sync"
method = 'POST'
output = upgrade_utils.call_api(usm_token, method, api_cmd)
output = upgrade_utils.call_api(
usm_token,
method,
api_cmd,
timeout_in_secs=constants.TIMEOUT_SYNC_API_CALL)
result = output.get("result")
if not result:
+2
View File
@@ -206,3 +206,5 @@ DC_VAULT_LOADS_DIR = "%s/loads" % DC_VAULT_DIR
PLAYBOOKS_PATH = "/usr/share/ansible/stx-ansible/playbooks"
ENABLE_DEV_CERTIFICATE_PATCH_IDENTIFIER = 'ENABLE_DEV_CERTIFICATE'
TIMEOUT_SYNC_API_CALL = 120