-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[FIX #1006] destroy/libvirt: cannot destroy domain if it is already shutoff #1043
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
[FIX #1006] destroy/libvirt: cannot destroy domain if it is already shutoff #1043
Conversation
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDestroy ``` Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. ``` Calling destroy on a shutoff/shutdown domain returns `Requested operation is not valid: domain is not running` error. Therefore, skipping calling destroy when domain is already in those 2 states.
|
/lgtm |
|
/hold |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, crawford The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Previous "already shutoff" discussion here. I'm reading through that again now... |
|
After re-reading #660, it looks like my previous position was "folks will have to unstick these manually anyway, so don't bother doing anything fancy". But if we can just skip With your 6374a90, there's a small race with the potential for:
It would be more robust to just attempt the |
atleast it will complete in the next |
|
/hold cancel |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDestroy
Calling destroy on a shutoff/shutdown domain returns
Requested operation is not valid: domain is not runningerror.Therefore, skipping calling destroy when domain is already in those 2 states.
Fixes #1006