You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while investigating a customer ticket, I noticed that you are not waiting on the additional actions returned from the POST /v1/servers endpoint. Instead you poll the server to wait for it to startup.
Based on the contents, the GET /v1/servers/:id endpoint which you currently use is less efficient than simply polling the actions. It also counts towards a different Rate Limit budget, which caused an issue for one customer because they exhausted the normal Rate Limit with these calls.
The text was updated successfully, but these errors were encountered:
thanks a lot for the input, I'll look into fixing this. Unfortunately, the way this currently works is yet another left-over from pre-hcloud-go times...
While I will provide a bug-fix release for this issue, I now seriously do consider re-implementing the whole creation logic at some point. Too many issues caused by the driver still basically doing what it has done since cloud-beta times with some more features and waitForActions sprinkled across. If there is any more input you want to share, I'd be glad to hear it.
Thanks for the investigation, @apricote - and for the quick implementation of the suggested changes @JonasProgrammer!
I think we were the customer you were investigating for @apricote, and we now updated this docker-machine driver to ensure we won't hit any limits again :-).
Julian from @hetznercloud here 👋
while investigating a customer ticket, I noticed that you are not waiting on the additional actions returned from the
POST /v1/servers
endpoint. Instead you poll the server to wait for it to startup.docker-machine-driver-hetzner/driver/driver.go
Lines 500 to 511 in 54b321f
I would recommend you wait on the actions in
srv.NextActions
. In there is also thestart_server
action, which is marked as completed once the server is running. You can check out our CLI code for comparison: https://github.com/hetznercloud/cli/blob/50fe4ca15deea739279539cf0bb2628ee2693f0e/internal/cmd/server/create.go#L100-L110There is also a helper client.Action.WatchOverallProgress that can watch multiple actions at the same time.
Based on the contents, the
GET /v1/servers/:id
endpoint which you currently use is less efficient than simply polling the actions. It also counts towards a different Rate Limit budget, which caused an issue for one customer because they exhausted the normal Rate Limit with these calls.The text was updated successfully, but these errors were encountered: