glance/glance/tests/unit/v1
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
..
__init__.py Adding versioned namespaces in test dir 2012-03-25 13:28:45 -07:00
test_api.py Fixed error message for negative values of min_disk and min_ram 2015-06-10 13:29:19 +00:00
test_registry_api.py Move from oslo.config to oslo_config 2015-01-12 14:34:22 +00:00
test_registry_client.py Upgrade to hacking 0.10 2015-01-13 15:03:27 +01:00
test_upload_utils.py Cleanup chunks for deleted image if token expired 2015-10-01 15:45:20 +00:00