cinder/cinder
Eric Harney eadff0df7e Prevent double-attachment race in attachment_reserve
If multiple attachments are requested simultaneously,
a volume can be attached to an instance more than once.

This fixes this problem by detecting that a race has
occurred in _attachment_reserve, and backing out one of
the invalid attachment records.

This means that if the attachment API is called
repeatedly and quickly for the same volume, some requests
may fail, but this is much better than incorrectly
creating multiple attachments.

Closes-Bug: #1833736

Change-Id: Ic2463338b698c5cf805c0ae06d0229f54f64b3fc
(cherry picked from commit 7f3a77b66f)
Depends-On: https://review.opendev.org/671370
2019-07-31 11:38:37 -04:00
..
api Add OS-SCH-HNT in extensions list 2019-06-08 13:30:09 +00:00
backup Fix swift backup driver crashing during service startup 2019-04-30 11:59:14 -04:00
brick Replace 'lvconvert' from rootwrap 2019-02-17 14:33:31 -05:00
cmd Prevent double-attachment race in attachment_reserve 2019-07-31 11:38:37 -04:00
common Use config-table for dynamic config documentation 2019-02-26 16:50:39 -06:00
compute Add user messages for extend volume operation 2018-06-01 09:12:07 +08:00
db Use config-table for dynamic config documentation 2019-02-26 16:50:39 -06:00
group Fix wrong uuid recognized when create group 2018-10-08 09:51:02 +08:00
hacking Fix pylint warning 2018-09-26 21:37:25 -04:00
image Use config-table for dynamic config documentation 2019-02-26 16:50:39 -06:00
interface Add get_driver_options method 2019-03-07 09:18:01 -05:00
keymgr Fix "import xxx as xxx" grammar 2019-01-23 15:35:53 +08:00
locale Imported Translations from Zanata 2019-01-13 07:04:20 +00:00
message Set user message on volume create failure 2018-10-26 05:27:36 -04:00
objects Merge "Fix VolumeAttachment is not bound to a Session" 2019-03-20 18:30:41 +00:00
policies Add project_id in group snapshots list and show API 2019-03-01 22:59:19 +05:30
privsep Revert "Remove truncate from rootwrap filters" 2019-03-06 10:08:10 -05:00
scheduler Add missing ws seperator between words 2019-01-23 14:21:15 +08:00
tests Prevent double-attachment race in attachment_reserve 2019-07-31 11:38:37 -04:00
transfer Support transfer pagination 2019-02-01 10:44:23 +08:00
volume Prevent double-attachment race in attachment_reserve 2019-07-31 11:38:37 -04:00
wsgi Prevent double-attachment race in attachment_reserve 2019-07-31 11:38:37 -04:00
zonemanager Add get_driver_options method 2019-03-07 09:18:01 -05:00
__init__.py
context.py Add Keystone v3 domain information to context 2018-04-25 09:29:33 -04:00
coordination.py Remove deprecated heartbeat options 2017-10-03 14:41:18 -05:00
exception.py Merge "RBD: add support for multiattach" 2019-02-22 10:22:48 +00:00
flow_utils.py
i18n.py Replace http with https for doc links in cinder 2017-10-17 11:14:01 +08:00
manager.py Allow configuring tpool size 2018-03-08 15:59:29 +01:00
opts.py Use config-table for dynamic config documentation 2019-02-26 16:50:39 -06:00
policy.py Correct default policy_file in the sample config 2019-01-15 13:54:17 -05:00
quota.py Get rid of keys() usage 2018-09-21 11:07:07 -04:00
quota_utils.py Enable split logging for cinder-keystoneclient interaction 2018-09-26 08:53:30 +00:00
rpc.py
service.py Use InvalidConfigurationValue instead of InvalidInput 2018-04-11 19:25:48 +08:00
service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
ssh_utils.py Stop a connections leak when freeing an SSHPool 2018-02-14 18:16:55 -06:00
test.py Merge "Automate generation of volume actions api-ref samples" 2019-03-16 19:34:27 +00:00
utils.py Mask passwords in utils.trace for func params 2019-01-02 17:22:07 +08:00
version.py