nova/nova/compute
Ameed Ashour 22164d5118 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
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 61f6751a18)
2018-02-15 13:09:24 -05:00
..
monitors Remove translation of log messages 2017-06-09 09:06:16 +00:00
__init__.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
api.py Query all cells for service version in _validate_bdm 2018-02-01 00:35:27 +00:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
cells_api.py Fix missing marker functions 2018-01-25 03:37:48 +00:00
claims.py [Trivial] docstrings, typos, minor refactoring 2017-08-28 08:33:58 -05:00
flavors.py Add microversion to allow setting flavor description 2017-11-15 22:10:39 +00:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Split instance_list into instance and multi_cell 2017-12-04 10:59:55 +08:00
manager.py Detach volumes when VM creation fails 2018-02-15 13:09:24 -05:00
migration_list.py Fix comment in MigrationSortContext 2018-01-10 14:04:23 -05:00
multi_cell_list.py Some nit fix in multi_cell_list 2017-12-13 14:27:20 +08:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py ProviderTree.get_provider_uuids: Top-down ordering 2018-01-31 08:35:35 -06:00
resource_tracker.py Add get_traits() method to ComputeDriver 2018-01-30 20:45:22 -05:00
rpcapi.py Compute RPC client bump to 5.0 2018-02-08 12:10:04 -08:00
stats.py Address nits in I83a5f06ad 2016-03-09 13:19:59 +00:00
task_states.py Have one list of reboot task_states 2017-09-14 20:57:38 +00:00
utils.py Merge "Fix missing 'if_notifications_enabled' decorator" 2018-01-31 14:08:15 +00:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00