nova/nova/tests/unit/compute
Matt Riedemann 1957f4d5a2 Use volume shared_targets to lock during attach/detach
The Cinder 3.48 API provides a shared_targets and service_uuid
field in the volume resource which tells the caller whether or
not it should lock operations on that volume.

This change adds that logic to the DriverVolumeBlockDevice attach
and detach flows by first trying to get the volume at the 3.48
microversion and if that's not available, it simply falls back
to get the volume the same as before.

If 3.48 is available and the volume storage backend uses shared
targets, we synchronize the attach/detach operations using the
volume service_uuid, which is based on the storage backend and
is also configurable by the deployer on the Cinder side.

This is a nice to have protection for "normal" volumes but
is really needed for multiattach volumes to be detached safely.

See Cinder blueprint add-shared-targets-flag-to-volume for details.

Part of blueprint multi-attach-volume

Depends-On: I3c07cd8458d55535a71626ffaa8ca50deb3ca3dd

Change-Id: I5e96602184242fb9017c0434b445a3875f3b149a
2018-01-04 14:30:27 -05:00
..
monitors Allow monitor plugins to set own metric object 2016-06-27 14:38:32 +05:30
__init__.py
eventlet_utils.py
fake_resource_tracker.py rt: explicitly pass compute node to _update() 2017-01-12 11:30:03 -08:00
test_claims.py rt: use a single ResourceTracker object instance 2017-01-16 14:09:25 -05:00
test_compute.py Use volume shared_targets to lock during attach/detach 2018-01-04 14:30:27 -05:00
test_compute_api.py Merge "Add instance action record for snapshot instances" 2017-12-28 02:16:46 +00:00
test_compute_cells.py Merge "remove reserve_quota_delta" 2017-12-12 22:06:09 +00:00
test_compute_mgr.py Merge "Avoid redundant BDM lookup in check_can_live_migrate_source" 2017-12-27 13:11:38 +00:00
test_compute_utils.py remove reserve_quota_delta 2017-11-30 06:12:05 +08:00
test_compute_xen.py Make xen unit tests work with os-xenapi>=0.3.0 2017-09-05 16:06:31 -04:00
test_flavors.py
test_host_api.py Handle uuid in HostAPI.compute_node_get 2017-06-19 09:57:49 -04:00
test_instance_list.py Some nit fix in multi_cell_list 2017-12-13 14:27:20 +08:00
test_keypairs.py Transform keypair.import notification 2017-10-30 16:44:29 -04:00
test_multi_cell_list.py Some nit fix in multi_cell_list 2017-12-13 14:27:20 +08:00
test_provider_tree.py Aggregate ops on ProviderTree 2017-12-15 13:16:15 +01:00
test_resource_tracker.py Re-use existing ComputeNode on ironic rebalance 2017-12-11 16:23:49 -05:00
test_rpcapi.py Make conductor pass and use host_lists 2017-12-21 17:02:35 -05:00
test_shelve.py Revert "Modify _poll_shelved_instances periodic task call _shelve_offload_instance()" 2017-12-28 10:53:23 +08:00
test_stats.py Address nits in Ia2296302 2016-03-08 16:48:08 +00:00
test_virtapi.py Remove mox from nova/tests/unit/compute/test_virtapi.py 2016-11-28 08:52:00 +00:00