Merge "Return 409 if removing/replacing image locations."

This commit is contained in:
Jenkins 2016-11-22 15:06:45 +00:00 committed by Gerrit Code Review
commit 12ce34ff3d
1 changed files with 39 additions and 0 deletions

View File

@ -34,5 +34,44 @@ Optionals (please remove this line and fill or remove the rest until End of Temp
End of Template
+++++++++++++++
Return 409 if removing/replacing the location of an image that's not ``active``
-------------------------------------------------------------------------------
:problem: When ``show_multiple_locations`` is set to ``True``, users currently
can remove or replace locations of an image irrespective of the image
status. This can result in bad experiences for the users:- 1) If one
tries to change or remove the location for an image while it is in
``saving`` state, Glance would be trying to write data to a previously
saved location while the user updates the custom location. This results
in a race condition. 2) For images that are in ``queued`` state and no
image data has been uploaded yet, there is no need for an image
location to be removed and permitting users to remove the image
location can result in a bad experience. However users can be allowed
to replace the image location to maintain backward compatibility and
also because replacing could mean replacing an empty location by a
non-empty image location. 3) For images in ``deactivated`` state, it
is essential that image locations are not updated as it does not abide
with the purpose of the image state being set to ``deactivated`` and
may cause security concerns.
:solution: 1) Return Conflict Error (409 response code) if an attempt to remove
the image location is made when the status of the image
is anything but ``active``. 2) Return Conflict Error (409 response
code) if an attempt to replace the image location is made when the
status of the image is anything but ``active`` or ``queued``.
:impacts: A Conflict Error will be thrown preventing users from removing an
image location when the image status is not ``active`` and replacing
an image location when the image status is not ``active`` or ``queued``.
:timeline: Expected to be merged within the ocata-1 time frame.
:link: https://review.openstack.org/#/c/366995/
:assignee: Nikhil Komawar, Dharini Chandrasekar
Return 409 if removing/replacing the location of an image that's not ``active``
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Add your Spec Lite before this line
===================================