yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07580
[Bug 1261738] Re: Openstack Glance: user_total_quota calculated incorrectly
I tested it with my local env and can't reproduce it. And after reviewed
the code, I don't think the 'killed' image size will be counted. See
https://github.com/openstack/glance/blob/master/glance/db/sqlalchemy/api.py#L716
In other words, the size will multiply the number of locations. However,
the locations number of 'killed' image is 0. So it won't be counted.
Please feel free reopen this bug if I missed anything. Thanks.
** Changed in: glance
Status: Triaged => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1261738
Title:
Openstack Glance: user_total_quota calculated incorrectly
Status in OpenStack Image Registry and Delivery Service (Glance):
Invalid
Bug description:
Description of problem: Bug in quota calculation, if an image upload
fails due to quota limit, the failed image size is still added to
total storage sum figure! Thus future images may fail to upload even
if it looks as quota hasn’t been reached yet.
Version-Release number of selected component (if applicable):
RHEL 6.5
python-glanceclient-0.12.0-1.el6ost.noarch
openstack-glance-2013.2-5.el6ost.noarch
python-glance-2013.2-5.el6ost.noarch
How reproducible:
Steps to Reproduce:
1. vim /etc/glance/glance-api.conf user_storage_quota = 250mb (in byets)
2. service glance-api restart
3. Upload test small image - would be ok
4. Upload large image say 4Giga, - should fail with "Error unable to create new image"
5. Try to upload another small file say 49MB.
Actual results:
If the large i,age file or sum of failed uploaded images are more than
the quota, any image size will fail to upload.
Expected results:
I should be able to upload as long as the sum of all my images is less
than configured qouta.
Additional info:
Mysql show databases;
connect glance;
SELECT * FROM images;
Noticed all the images i tired, initial successful uploaded image
status=”active”, images that i deleted status=”deleted”, images that
failed to upload due to quota status=”killed”
I than calculated the sum of all the “killed” images.
Set a new quota of the above calculated value + 100MB, restarted glance-api service.
Only than i was able to upload another image of 49MB.
When i set a lower quota value (below the calculated sum of all the
killed images) wasn’t able to upload any image.
Images of status killed, which fail upload for any reason, should not
be added to total storage sum calcualtion or quota.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1261738/+subscriptions
References