-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider/scaleway speedup server deletion #9491
provider/scaleway speedup server deletion #9491
Conversation
using `terminate` instead of `poweroff` leads to a faster shutdown fixes #9430
if server.State != "stopped" { | ||
if err := s.PostServerAction(serverID, "poweroff"); err != nil { | ||
return err | ||
return resource.Retry(5*time.Minute, func() *resource.RetryError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 minutes seams very optimistic considering the current performances of scaleway, any way to make this with config at the provider level and/or to put 10 minutes ?
if err := waitForServerState(s, serverID, "stopped"); err != nil { | ||
return err | ||
|
||
if serr, ok := err.(api.ScalewayAPIError); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at some point we could consider an helper method like isRessouceMissingError(err) bool no ?
Hi @nicolai86 Thanks for the work here - this LGTM! I think we should have a follow up at some point that addresses @dcharbonnier points though :)
|
* provider/scaleway speedup server deletion using `terminate` instead of `poweroff` leads to a faster shutdown fixes hashicorp#9430 * provider/scaleway: extract server shutdown code
* provider/scaleway speedup server deletion using `terminate` instead of `poweroff` leads to a faster shutdown fixes hashicorp#9430 * provider/scaleway: extract server shutdown code
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
using
terminate
instead ofpoweroff
leads to a faster shutdownfixes #9430
tests remain green. I've used the opportunity to start switching from indefinite waits to
resource.Retry
so things time out properly after a while. Previously this would not happen.