glance/glance/api
Mike Fedosin 5447e8419d Cleanup chunks for deleted image if token expired
In patch I47229b366c25367ec1bd48aec684e0880f3dfe60 it was
introduced the logic that if image was deleted during file
upload when we want to update image status from 'saving'
to 'active' it's expected to get Duplicate error and delete
stale chunks after that. But if user's token is expired
there will be Unathorized exception and chunks will stay
in store and clog it.
And when, the upload operation for such an image is
completed the operator configured quota can be exceeded.

This patch fixes the issue of left over chunks for an image
which was deleted from saving status, by correcly handle
auth exceptions from registry server.

This patch fixes the issue of left over chunks for an image
which was deleted from saving status, by correctly handle
auth exceptions from registry server.

Partial-bug: #1498163

Conflicts:
	glance/api/v1/upload_utils.py
        (Kilo catches NotFound instead of ImagenotFound)

Change-Id: I17a66eca55bfb83107046910e69c4da01415deec
(cherry picked from commit 50e3a7c58a9862206d92fef577540c5b144ecbf0)
2015-10-01 15:44:56 +00:00
..
middleware Replace assert statements with proper control-flow 2015-04-17 15:09:21 -05:00
v1 Cleanup chunks for deleted image if token expired 2015-10-01 15:44:56 +00:00
v2 Cleanup chunks for deleted image if token expired 2015-10-01 15:44:56 +00:00
__init__.py Remove vim header 2014-01-14 16:03:28 +00:00
authorization.py Cleanup chunks for deleted image that was 'saving' 2015-01-22 13:41:01 -06:00
cached_images.py Remove vim header 2014-01-14 16:03:28 +00:00
common.py Refactoring Glance logging lowering levels 2014-07-17 10:03:12 +00:00
policy.py Cleanup chunks for deleted image that was 'saving' 2015-01-22 13:41:01 -06:00
property_protections.py Fixes the failure of updating or deleting image empty property 2014-07-21 04:33:02 +08:00
versions.py Remove vim header 2014-01-14 16:03:28 +00:00