1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-03 23:51:48 +00:00

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 <marco.montesi@gmail.com>
This commit is contained in:
Julian Tölle 2024-09-23 09:00:57 +02:00 committed by GitHub
parent a2d5d1f695
commit 98e9c52c74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- server - Wait up to 30 minutes for every action returned from server create

View file

@ -473,7 +473,12 @@ class AnsibleHCloudServer(AnsibleHCloud):
# 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: