-
Notifications
You must be signed in to change notification settings - Fork 1.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
scaleway_compute: When removing node, wait for transition #444
scaleway_compute: When removing node, wait for transition #444
Conversation
bb1b171
to
276789a
Compare
The Edit: found #402, which describes this issue. |
recheck |
To remove a scaleway compute node, one needs to stop it first. This is handled internally within the module by shutting down before removing. Shutting down the node transitions it to a "stopping" state, which is not the "stopped" state we expect. We thus need the transition to complete so that we can put it in the actual target state (absent, i.e. delete it). The mechanism for waiting for such transitions today is controlled by module parameters, with default to not being enabled at all, which includes the transition from ([running] -(stopping)-> [stopped]). Without this chage, in case of a running node, we would shut it down (transition it to "stopping"), not wait for it complete the transition, realize that it's not yet stopped and issue a second shut down command to the api. This would fail with a 400 Bad Request error, "already stopped". Reference: ansible/ansible#45740 Reported-by: zwindler
276789a
to
1bbca26
Compare
@sieben , as the module's author, could you please take a look? |
shipit |
@remyleone thanks for fast reply! |
@olof thanks for the contribution! |
merged #444 into master |
Super, thanks everybody involved :) |
SUMMARY
To remove a scaleway compute node, one needs to stop it first. This is
handled internally within the module by shutting down before removing.
Shutting down the node transitions it to a "stopping" state, which is
not the "stopped" state we expect. We thus need the transition to
complete so that we can put it in the actual target state (absent, i.e.
delete it).
The mechanism for waiting for such transitions today is controlled by
module parameters, with default to not being enabled at all, which
includes the transition from ([running] -(stopping)-> [stopped]).
Without this chage, in case of a running node, we would shut it down
(transition it to "stopping"), not wait for it complete the transition,
realize that it's not yet stopped and issue a second shut down command
to the api. This would fail with a 400 Bad Request error, "already
stopped".
ISSUE TYPE
COMPONENT NAME
scaleway_compute
ADDITIONAL INFORMATION
This was originally reported as ansible/ansible#45740, and proposed in ansible/ansible#68392.
(Edit: initially wrong component name. Updated.)