← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1261738] Re: Openstack Glance: user_total_quota calculated incorrectly

 

** Changed in: glance/havana
       Status: Fix Committed => Fix Released

-- 
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):
  Fix Released
Status in Glance havana series:
  Fix Released

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