nova/nova/compute
Lee Yarwood fb81b16df0 compute: Lock by instance.uuid lock during swap_volume
The libvirt driver is currently the only virt driver implementing swap
volume within Nova. While libvirt itself does support moving between
multiple volumes attached to the same instance at the same time the
current logic within the libvirt driver makes a call to
virDomainGetXMLDesc that fails if there are active block jobs against
any disk attached to the domain.

This change simply uses an instance.uuid based lock in the compute layer
to serialise requests to swap_volume to avoid this from being possible.

Closes-Bug: #1896621
Change-Id: Ic5ce2580e7638a47f1ffddb4edbb503bf490504c
(cherry picked from commit 6cf449bdd0)
(cherry picked from commit eebf94b654)
(cherry picked from commit f7ba1aab5f)
2021-03-11 15:39:46 +00:00
..
monitors hacking: Resolve W503 (line break occurred before a binary operator) 2019-06-24 14:24:06 -05:00
__init__.py Remove nova.compute.*API() shims 2019-06-12 16:09:46 +01:00
api.py Merge "compute: Validate a BDMs disk_bus when provided" into stable/train 2020-10-23 19:34:06 +00:00
build_results.py
claims.py Introduce live_migration_claim() 2019-09-03 12:10:40 -04:00
flavors.py Remove deprecated 'default_flavor' config option 2019-04-30 13:01:40 +00:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Plumbing for ignoring list_records_by_skipping_down_cells 2019-02-08 16:28:28 -05:00
manager.py compute: Lock by instance.uuid lock during swap_volume 2021-03-11 15:39:46 +00:00
migration_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
multi_cell_list.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py Add resources dict into _Provider 2019-09-13 08:50:35 +00:00
resource_tracker.py Don't populate resources for not-yet-migrated inst 2019-10-22 10:10:36 -05:00
rpcapi.py compute: Use long_rpc_timeout in reserve_block_device_name 2019-12-02 20:09:55 +00:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Fix resource tracker updates during instance evacuation 2018-09-12 13:05:29 +03:00
utils.py Add nova.compute.utils.delete_image 2019-08-27 14:26:33 -04:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00