yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #52613
[Bug 1557495] Re: Possible race conditions when changing image status in v2
Reviewed: https://review.openstack.org/292855
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8708273d485c482007fc0ffafb1549fa2c68dae3
Submitter: Jenkins
Branch: master
commit 8708273d485c482007fc0ffafb1549fa2c68dae3
Author: Mike Fedosin <mfedosin@xxxxxxxxxxxx>
Date: Tue Mar 15 15:15:03 2016 +0300
Fix possible race conditions during status change
To eliminate potential race conditions when image status
is changed it's suggested to use 'from_state' parameter
for 'save' methods everywhere where it's possible.
Also this code prevents image update when status hasn't
been changed in deactivate/reativate methods.
Closes-Bug: #1557495
Change-Id: Ic79224a8686bea6ca79976a7f30e3c87bba4e6ec
** Changed in: glance
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1557495
Title:
Possible race conditions when changing image status in v2
Status in Glance:
Fix Released
Bug description:
Currently Glance architecture (domain model) is affected by possible
race conditions during image status transition. To eliminate this
there was introduced a parameter called 'from_state' in 'save' method
for ImageRepo. Unfortunately it only checks if transition happened
from 'saving' to 'active':
https://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py#L117
Other cases are still not fixed and it leads to the fact that admin
can reactivate deleted image and it will have status 'active'. Also
Glance rewrites the status even if it didn't change. To fix it it's
suggested to use 'from_state' parameters in other places, where race
conditions may happen.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1557495/+subscriptions
References