From 98e9c52c74d2ceaa53dfc1c7e5c9f77e166dd865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Mon, 23 Sep 2024 09:00:57 +0200 Subject: [PATCH] fix(server): timeout in server creation when waiting on next actions (#561) While we wait a long time on the `create_server` actions, we only wait 2 minutes on any follow up actions like `start_server` or `attach_network`. This is sometimes not enough. This commit adds a longer wait timeout for the `next_actions` returned after creating the server. Co-authored-by: Marco Montesi --- changelogs/fragments/server-create-next-actions.yml | 2 ++ plugins/modules/server.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/server-create-next-actions.yml diff --git a/changelogs/fragments/server-create-next-actions.yml b/changelogs/fragments/server-create-next-actions.yml new file mode 100644 index 00000000..34077fd1 --- /dev/null +++ b/changelogs/fragments/server-create-next-actions.yml @@ -0,0 +1,2 @@ +bugfixes: + - server - Wait up to 30 minutes for every action returned from server create diff --git a/plugins/modules/server.py b/plugins/modules/server.py index eb623e14..335209e2 100644 --- a/plugins/modules/server.py +++ b/plugins/modules/server.py @@ -473,7 +473,12 @@ def _create_server(self): # server from a custom images resp.action.wait_until_finished(max_retries=362) # 362 retries >= 1802 seconds for action in resp.next_actions: - action.wait_until_finished() + # Starting the server or attaching to the network might take a few minutes, + # depending on the current activity in the project. + # This waits up to 30minutes for each action in series, but in the background + # the actions are mostly running in parallel, so after the first one the other + # actions are usually completed already. + action.wait_until_finished(max_retries=362) # 362 retries >= 1802 seconds rescue_mode = self.module.params.get("rescue_mode") if rescue_mode: