Skip to content

Commit

Permalink
fix(server): timeout in server creation when waiting on next actions (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
apricote and mmontesi authored Sep 23, 2024
1 parent a2d5d1f commit 98e9c52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/server-create-next-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- server - Wait up to 30 minutes for every action returned from server create
7 changes: 6 additions & 1 deletion plugins/modules/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 98e9c52

Please sign in to comment.