glance/glance
Mike Fedosin 5bebd513fa 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 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 98a8832777a0639a4031e52c69f0d565b3f500c5)
2015-10-01 15:45:20 +00:00
..
api Cleanup chunks for deleted image if token expired 2015-10-01 15:45:20 +00:00
artifacts Database layer for Artifact Repository 2015-03-27 02:48:15 +03:00
async Don't import files with backed files 2015-08-13 20:55:21 +02:00
cmd Fix OSProfiler exception when is enabled 2015-06-23 21:13:59 +00:00
common return request_id in case of 500 error 2015-08-17 23:46:27 -07:00
contrib Artifact Plugins Loader 2015-03-30 20:51:10 +03:00
db Read tag name instead of ID 2015-04-23 15:35:20 -04:00
domain Merge "Add ability to deactivate an image" 2015-03-15 11:58:54 +00:00
hacking Remove use of contextlib.nested 2015-03-18 20:20:33 +08:00
image_cache Glance cache to not prune newly cached images 2015-04-01 23:26:12 -04:00
locale Release Import of Translations from Transifex 2015-04-20 11:09:52 +02:00
openstack Update openstack-common reference in openstack/common/README 2015-04-08 17:47:53 +02:00
quota Move to graduated oslo.log module 2015-03-12 11:48:24 +00:00
registry Merge "Add the ability to specify the sort dir for each key" 2015-03-13 05:54:13 +00:00
search Plugin types are not exposed to the client. 2015-04-23 16:38:18 -04:00
tests Cleanup chunks for deleted image if token expired 2015-10-01 15:45:20 +00:00
__init__.py Empty files shouldn't contain copyright nor license 2013-12-24 22:39:05 -06:00
context.py Simplify context by using oslo.context 2015-02-02 09:51:52 +01:00
gateway.py Move elasticsearch dep to test-requirements.txt 2015-04-08 10:59:44 -07:00
i18n.py Switch over oslo.i18n 2014-07-08 15:28:44 +02:00
listener.py Catalog Index Service - Index Update 2015-03-26 10:22:38 -07:00
location.py Move to graduated oslo.log module 2015-03-12 11:48:24 +00:00
notifier.py Creating metadef object without any properties 2015-03-30 14:16:57 +02:00
opts.py Use graduated oslo.policy 2015-03-17 23:50:02 -05:00
schema.py Return empty str for permissive, none, properties 2015-06-09 16:49:34 +02:00
scrubber.py Move to graduated oslo.log module 2015-03-12 11:48:24 +00:00
service.py Catalog Index Service - Index Update 2015-03-26 10:22:38 -07:00
version.py Remove vim header 2014-01-14 16:03:28 +00:00