nova/nova/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 Move flushing block devices to privsep. 2017-12-13 05:22:15 +11:00
hyperv Merge "hyper-v: Do not allow instances with pinned CPUs to spawn" 2017-12-23 16:52:37 +00:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic Re-use existing ComputeNode on ironic rebalance 2017-12-11 16:23:49 -05:00
libvirt Merge "libvirt: don't log snapshot success unless it actually happens" 2017-12-23 17:15:31 +00:00
powervm PowerVM Driver: config drive 2017-11-16 16:15:03 -06: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 Declare nova.virt namespace 2016-04-28 15:01:44 +00:00
block_device.py Use volume shared_targets to lock during attach/detach 2018-01-04 14:30:27 -05:00
configdrive.py Cleanup mount / umount and associated rmdir calls 2017-10-18 17:52:58 +11:00
driver.py Re-use existing ComputeNode on ironic rebalance 2017-12-11 16:23:49 -05:00
event.py
fake.py Re-use existing ComputeNode on ironic rebalance 2017-12-11 16:23:49 -05:00
firewall.py Merge "Remove translation of log messages" 2017-06-20 21:16:49 +00:00
hardware.py Merge "hardware: Flatten functions" 2017-12-28 15:53:59 +00:00
imagecache.py Rename ImageCacheManager._list_base_images to _scan_base_images 2016-05-26 14:45:42 +01:00
images.py qemu-img do not use cache=none if no O_DIRECT support 2017-11-29 22:33:39 +00:00
interfaces.template
netutils.py provide interface-scoped nameserver information 2017-07-19 21:08:59 -04:00
osinfo.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
storage_users.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
virtapi.py Remove unused provider firewall rules functionality in nova 2016-02-01 15:50:04 +01:00