]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Remove API races from attach and detach methods
authorGorka Eguileor <geguileo@redhat.com>
Fri, 21 Aug 2015 17:13:50 +0000 (19:13 +0200)
committerGorka Eguileor <geguileo@redhat.com>
Wed, 23 Dec 2015 13:33:38 +0000 (14:33 +0100)
commitc7bfd636b32cfeebeb45135a6aedcd8e9214ca11
tree9bfe4a23bd6a2c4c65407c675b88194660551faa
parentae2ec9bf69a8567535e77a9e50bce61d9e53d95a
Remove API races from attach and detach methods

This patch uses compare-and-swap to perform atomic DB changes to remove
API races in attach and detach related methods.

Races are removes from the following methods:
- attach
- roll_detaching
- begin_detaching
- unreserve_volume
- reserve_volume

Specs: https://review.openstack.org/232599/

Implements: blueprint cinder-volume-active-active-support
Closes-Bug: #1238093
Change-Id: I646d946209e0921d1056ee89e59b82b814bf9c15
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/tests/unit/test_volume.py
cinder/utils.py
cinder/volume/api.py