nova/nova
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
..
CA
api Merge "placement: skip authentication on root URI" 2017-12-27 13:43:51 +00:00
cells Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
cmd Merge "Add support for listing hosts in cellv2" 2018-01-03 23:19:40 +00:00
common
compute Merge "Revert "Modify _poll_shelved_instances periodic task call _shelve_offload_instance()"" 2018-01-04 17:48:55 +00:00
conductor Merge "Raise specific exception when swapping migration allocations fails" 2017-12-27 20:01:39 +00:00
conf Merge "Add PCI NUMA policies" 2017-12-30 11:40:15 +00:00
console console: introduce basic framework for security proxying 2017-09-28 16:39:22 +01:00
consoleauth Merge "Remove translation of log messages" 2017-08-10 11:39:03 +00:00
db Merge "Add uuid column to BlockDeviceMapping" 2017-12-27 10:43:09 +00:00
hacking trivial: Rename 'policy_check' -> 'policy' 2017-10-25 17:56:40 +01:00
image Remove direct usage of glance.generate_image_url 2017-12-01 00:02:41 +08:00
ipv6
keymgr Remove deprecated keymgr code 2017-09-11 15:48:30 -04:00
locale Imported Translations from Zanata 2017-08-10 11:34:33 +00:00
network Fix possible TypeError in VIF.fixed_ips 2017-12-14 11:15:52 +01:00
notifications Merge "Remove direct usage of glance.generate_image_url" 2017-12-12 23:40:22 +00:00
objects Merge "Add support for listing hosts in cellv2" 2018-01-03 23:19:40 +00:00
pci trivial: Modify signature of _filter_non_requested_pfs 2017-12-22 16:00:08 +00:00
policies Merge "Deprecate API extensions policies" 2018-01-03 09:08:07 +00:00
privsep Move flushing block devices to privsep. 2017-12-13 05:22:15 +11:00
scheduler [placement] Add sending global request ID in delete 2017-12-24 22:41:27 +00:00
servicegroup iso8601.is8601.Utc No Longer Exists 2017-08-29 19:26:55 -04:00
tests Use volume shared_targets to lock during attach/detach 2018-01-04 14:30:27 -05:00
virt Use volume shared_targets to lock during attach/detach 2018-01-04 14:30:27 -05:00
vnc
volume Add support for getting volume details with a specified microversion 2018-01-02 15:34:05 +01:00
__init__.py
availability_zones.py Avoid lazy-load error when getting instance AZ 2017-05-25 15:46:22 -04:00
baserpc.py
block_device.py Add uuid column to BlockDeviceMapping 2017-12-17 14:28:35 +00:00
cache_utils.py remove log translation tags from nova.cells 2017-04-10 14:48:07 +00:00
config.py
context.py Get auth from context for glance endpoint 2017-11-21 10:26:42 -06:00
crypto.py
debugger.py
exception.py Merge "Raise specific exception when swapping migration allocations fails" 2017-12-27 20:01:39 +00:00
exception_wrapper.py rename binary to source in versioned notifications 2017-07-25 17:36:04 +02:00
filters.py
hooks.py
i18n.py
loadables.py
manager.py
policy.py Add policy granularity to the Flavors API 2017-07-19 15:56:47 -04:00
profiler.py
quota.py Follow up on removing old-style quotas code 2017-12-08 22:11:24 +00:00
rpc.py Remove dead code of api.fault notification sending 2017-10-09 17:29:40 +02:00
safe_utils.py Allow wrapping of closures 2017-07-20 10:07:52 +01:00
service.py Enhance doc for nova services 2017-08-31 08:30:48 +08:00
service_auth.py Fix NoneType error when [service_user] is misconfigured 2017-11-28 12:22:30 -06:00
test.py test: Store the OutputStreamCapture fixture 2017-10-25 17:07:34 +01:00
utils.py qemu-img do not use cache=none if no O_DIRECT support 2017-11-29 22:33:39 +00:00
version.py
weights.py
wsgi.py