If the boot-volume creation fails, the data volume is left in state
"in-use", attached to the server which is now in "error" state.
The user can't detach the volume because of the server's error state.
They can delete the server, which then leaves the volume apparently
attached to a server that no longer exists, which is being fixed
separately: https://review.openstack.org/#/c/340614/
The only way out of this is to ask an administrator to reset the state of
the data volume (this option is not available to regular users by
default policy).
This change fixes the problem in the compute service such that
when the creation fails, compute manager detaches the created volumes
before putting the VM into error state. Then you can delete the instance
without care about attached volumes.
Change-Id: I8b1c05317734e14ea73dc868941351bb31210bf0
Closes-bug: #1633249
(cherry picked from commit 61f6751a1807d3c3ee76d0351d17a82c6e1a915a)
(cherry picked from commit 22164d5118ea04321432432d89877aae91097e81)
Reviewed: https:/ /review. openstack. org/544143 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4dbe72f976a 67d442fd0e0489c adc3bc605ed012
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 4dbe72f976a67d4 42fd0e0489cadc3 bc605ed012
Author: Ameed Ashour <email address hidden>
Date: Wed Jan 24 09:32:24 2018 -0500
Detach volumes when VM creation fails
If the boot-volume creation fails, the data volume is left in state
"in-use", attached to the server which is now in "error" state.
The user can't detach the volume because of the server's error state.
They can delete the server, which then leaves the volume apparently /review. openstack. org/#/c/ 340614/
attached to a server that no longer exists, which is being fixed
separately: https:/
The only way out of this is to ask an administrator to reset the state of
the data volume (this option is not available to regular users by
default policy).
This change fixes the problem in the compute service such that
when the creation fails, compute manager detaches the created volumes
before putting the VM into error state. Then you can delete the instance
without care about attached volumes.
Change-Id: I8b1c05317734e1 4ea73dc86894135 1bb31210bf0 3ee76d0351d17a8 2c6e1a915a) 21432432d89877a ae91097e81)
Closes-bug: #1633249
(cherry picked from commit 61f6751a1807d3c
(cherry picked from commit 22164d5118ea043