Comment 0 for bug 1734832

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

ImageSizeLimitExceeded exception block [1] is unreachable in upload because
it is caught at [1] and raised StorageQuotaFull exception from there.

Further as it raised StorageQuataFull exception it prints None as a size in the glance-api logs.

Reference glance-api-logs:
Nov 28 07:04:13 devstack <email address hidden>[11453]: ERROR glance.api.v2.image_data [None req-17b243db-9b3d-46d9-97f0-05f74bc76e18 admin admin] Image exceeds the storage quota: The size of the data None will exceed the limit. None bytes remaining.: StorageQuotaFull: The size of the data None will exceed the limit. None bytes remaining.

To make it correct we need to remove code from [2] where ImageSizeLimitExceeded is caught and StorageQuotaFull is raised so that it will be reachable in the controller [1].

[1] https://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py#L232
[2] https://github.com/openstack/glance/blob/master/glance/quota/__init__.py#L305