Comment 9 for bug 1398830

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote : Re: Glance image leak when in saving state

Hi,

I have done some testing using attached program by admin and normal user(demo).

In case of admin user, if image is deleted while it is in saving state, image data doesn't get deleted even after data is completely uploaded to the backend.

In case of normal user, if image is deleted while it is in saving state, data gets deleted after image upload completes.
In this case once upload is completed it tries to update the image meta-data, but as image is already deleted it raises ImageNotFound exception and cleans the data for that image from the backend.

user_storage_quota is not considered in the above case as the image is deleted. user_storage_quota doesn't considered 'deleted' or 'killed' images for checking the quota size. So if the image is deleted while the uploading is processing and user tries to add new image, the user_storage_quota will not consider the previous image size as it's status is deleted and doesn't throw 'StorageQuotaFull' exception even if quota size is exceeding.

IMO, image deletion should not be allowed when the image is in saving state.
Please let me know your opinion on the same.