nova/nova/tests/unit/virt
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
..
disk Convert ext filesystem resizes to privsep. 2017-12-13 05:22:05 +11:00
hyperv Merge "hyper-v: Do not allow instances with pinned CPUs to spawn" 2017-12-23 16:52:37 +00:00
image Use assert(Not)Equal instead of assertTrue(A == X) 2016-06-03 16:53:15 +01:00
ironic Regenerate and pass configdrive when rebuild Ironic nodes 2017-11-21 17:37:03 -05:00
libvirt Merge "Remove dead parameter from '_create_domain_and_network'" 2017-12-23 16:52:18 +00:00
powervm Merge "Use NoDBTestCase for powervm driver tests" 2017-12-01 01:41:28 +00:00
vmwareapi VMware: implement get_inventory() driver method 2017-12-12 10:11:12 +02:00
xenapi XenAPI: Unit tests must mock os_xenapi calls 2017-12-28 23:11:47 +00:00
__init__.py
fakelibosinfo.py Fix misuse of assertTrue in console and virt tests 2016-02-22 16:09:21 +09:00
test_block_device.py Use volume shared_targets to lock during attach/detach 2018-01-04 14:30:27 -05:00
test_configdrive.py force_config_drive: StrOpt -> BoolOpt 2015-11-11 19:59:22 +00:00
test_driver.py Remove usage of parameter enforce_type 2017-04-17 20:23:19 +08:00
test_events.py
test_fake.py
test_firewall.py remove get_nw_info_for_instance from compute.utils 2017-06-13 13:30:06 +02:00
test_hardware.py Trim the fat from InstanceInfo 2017-07-25 10:27:23 -05:00
test_imagecache.py Remove mox from tests/unit/virt/test_imagecache.py 2016-06-16 23:40:01 +00:00
test_images.py qemu-img do not use cache=none if no O_DIRECT support 2017-11-29 22:33:39 +00:00
test_netutils.py Remove unnecessary code 2017-07-28 06:01:21 +00:00
test_osinfo.py Do not attempt to load osinfo if we do not have os_distro 2017-03-23 22:07:03 -04:00
test_virt.py Move flushing block devices to privsep. 2017-12-13 05:22:15 +11:00
test_virt_drivers.py Send Allocations to spawn 2017-10-18 06:43:57 -05:00