cinder/cinder/volume
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
..
drivers Merge "lvm: Only use initiators when comparing connector dicts" into stable/stein 2019-06-05 20:17:01 +00:00
flows Create new image volume cache entry when cloning fails 2019-01-15 06:33:49 -05:00
targets Switch ietadm to use olso.privsep 2019-01-11 13:30:55 +00:00
__init__.py Fix dynamic import of CONF.volume_api_class 2016-02-12 10:50:31 -06:00
api.py Prevent double-attachment race in attachment_reserve 2019-07-31 11:38:37 -04:00
configuration.py Add support for shared "backend_defaults" config 2017-07-11 18:58:58 +00:00
driver.py Add get_driver_options method 2019-03-07 09:18:01 -05:00
driver_utils.py Remove log translations 2017-03-19 14:59:57 +00:00
group_types.py handle no default_cgsnapshot_type 2017-11-28 21:55:29 +00:00
manager.py Merge "Move 'attach.end' notify to attachment_complete" 2019-03-04 22:16:47 +00:00
qos_specs.py [Doc] Handle Sphinx warnings as errors 2017-08-29 16:00:09 -05:00
rpcapi.py Transfer snapshots with volumes 2018-07-19 09:42:43 +08:00
throttling.py Implement privsep boilerplate in cinder. 2018-06-06 09:42:54 +08:00
utils.py Use excutils.save_and_reraise_exception instead of reraise 2019-03-11 14:17:04 +08:00
volume_migration.py Initiating Cinder Volume Manager with large number of volumes 2019-01-11 08:19:07 -05:00
volume_types.py Fix wrong NotFound in get_by_name_or_id 2018-09-29 09:26:19 +00:00