openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #08970
Re: nova-manage quota --headroom
On 03/22/2012 09:36 AM, Eoghan Glynn wrote:
Folks,
One thing that's been on my wishlist since hitting a bunch of
quota exceeded issues when first running Tempest and also on
the Fedora17 openstack test day.
It's ability to easily see the remaining headroom for each
per-project quota, e.g.
$ nova-manage quota --headroom --project=admin
...
instances: 10 (of which 1 remaining)
floating_ips: 10 (of which 8 remaining)
...
This would give an immediate indication of an impending resource
starvation issue - "shoot, I'll have to clean out some of those
old instances before spinning up two more, else increase the quota".
That would be seriously useful.
It would only really be useful for quotas that represent a
threshold on overall resource usage that may grow or shrink over
time, as opposed to some fixed limit (think, max instances versus
max injected files per instance).
Sure, yes.
So the question is whether there's already a means to acheive this
in one fell swoop?
Well, Horizon, in the launch instance modal dialog does show similar
information. See attached screenshot. That dialog uses a call to the
contrib/simple_usage extension of the compute API [1][2][3]
And if not, would it be best tracked with a small-scale nova blueprint,
or as an enhancement request expressed in a launchpad bug?
I think a small-scale blueprint is appropriate at this time -- and you
can get signoff for it at the design summit (in a "rubberstamp session").
Basically, you could take any of these approaches:
a) Modify the simple_usage extension to return information about the
quotas along with the usage information
b) Make a new extension to the API that marries the usage with the quota
c) Make a new novaclient call that exposes the married information
Cheers!
-jay
[1]
https://github.com/openstack/horizon/blob/master/horizon/usage/base.py#L117
[2]
https://github.com/openstack/horizon/blob/master/horizon/api/nova.py#L111
[3]
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/simple_tenant_usage.py
Attachment:
launch_quotas.png
Description: PNG image
Follow ups
References