[Openstack] Quotas... 1 of 1 instances? What's the deal?

Kevin L. Mitchell kevin.mitchell at rackspace.com
Mon Jun 4 21:43:14 UTC 2012


On Mon, 2012-06-04 at 16:52 -0400, Jay Pipes wrote:
> In Horizon, my tenant/user clearly says that 10 instances is my quota, 
> and yet trying to create a single server I'm getting this:
> 
> jpipes at uberbox:~/repos/tempest$ nosetests -v --nologcapture 
> ======================================================================
> ERROR: test suite for <class 
> 'tempest.tests.compute.test_servers_negative.ServersNegativeTest'>
> ----------------------------------------------------------------------
[snip]
>    File "/home/jpipes/repos/tempest/tempest/common/rest_client.py", line 
> 205, in request
>      raise exceptions.OverLimit(resp_body['overLimit']['message'])
> OverLimit: Quota exceeded
> Details: Quota exceeded: already used 1 of 1 instances
> 
> But there are no instances at all on the box:

One thing to check is the total quotas on memory and disk, relative to
the size of the instance.  The original code computes a maximum number
of instances based on those values; my new code simply tries to emulate
that computation.  (I'm pretty sure I got it right, but honestly quotas
needs further rototillings…)

> When I check the DB, though, I've seeing the following:
> 
> mysql> select project_id, in_use, reserved, until_refresh from 
> quota_usages where resource = 'instances';
> +----------------------------------+--------+----------+---------------+
> | project_id                       | in_use | reserved | until_refresh |
> +----------------------------------+--------+----------+---------------+
> | 287a92da0cf14a27a43c8737417b029d |      0 |       10 |          NULL |
> | f0c72dea9fda459aac64de460300e1ec |      0 |        2 |          NULL |
> +----------------------------------+--------+----------+---------------+
> 2 rows in set (0.00 sec)

Hmmm…when quiesced, you should only see reservations if instances are
actively building.  (In fact, reservations should be committed as soon
as the instances are created in the database.)  It's possible that I
missed places where instances are created, but I thought I got them all…

> What's the deal here? Tempest needs to create and delete servers in 
> rapid succession, and it seems the reservation system might not be able 
> to keep up?

Honestly, I thought the new quotas system was passing Tempest.  When I
originally pushed the patch, there were some problems with quota usages
dropping negative, but I hacked around that by forcing usages to be
refreshed if they would be set negative.  This system is pretty complex,
because of everything it has to deal with, and it's possible there are
problems I haven't found yet :/

> At a minimum, I think that the OverLimit: "Quota exceeded: already used 
> 1 of 1 instances" message should be updated to not be so obviously wrong 
> with regard to the value of the resource quota itself?

If my theory above about computed maximum instances is correct, then we
might be looking at an interface change to do such an update.  That
said, this probably should be done :)
-- 
Kevin L. Mitchell <kevin.mitchell at rackspace.com>





More information about the Openstack mailing list