Re: [openstack-dev] [nova] Limits API and project-user-quotas

2014-07-09 Thread Kevin L. Mitchell
On Fri, 2014-07-04 at 23:06 +, Day, Phil wrote:
> Working on the server groups quotas I hit an issue with the limits API
> which I wanted to get feedback on.
> 
> Currently this always shows just the project level quotas and usage,
> which can be confusing if there is a lower user specific quota.  For
> example:
[snip]
> The quota API itself allows a user to get either the project level
> quota or any per-user quota within that project – which does make all
> of the information available even if it is a tad odd that the default
> (no user specified) is to see the overall quota rather than the one
> that apples to the user making the  request.   They can’t however via
> the quotas API find out project level usage.
> 
> Thoughts on what the correct model is here ?

My thinking is that the limits API should only show rate limit
information; you should have to go to the quotas API to get information
about quotas.  I really dislike the fact that we have two different
sources for the same information, and the feature drift that's occurred
here is an excellent argument for my stance :)
-- 
Kevin L. Mitchell 
Rackspace


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova] Limits API and project-user-quotas

2014-07-04 Thread Day, Phil
Hi Folks,

Working on the server groups quotas I hit an issue with the limits API which I 
wanted to get feedback on.

Currently this always shows just the project level quotas and usage, which can 
be confusing if there is a lower user specific quota.  For example:

Project Quota = 10
User Quota = 1
User Usage = 1
Other User Usage = 2

If we show just the overall project usage and quota we get (used=3, quota=10) - 
which suggest that the quota is not fully used, and I can go ahead and create 
something.

However if we show the user quotas we get (used=1, quota=1), which shows 
correctly that I would get a quota error on creation.


But if we do switch to returning the used view of quotas and usage we can get a 
different problem:

Project Quota = 10
User Quota = 5
User Usage = 1
Other User Usage = 9

Now if we show just the user quotas we get (used=1, quota=5), which suggests 
that there is capacity when in fact there isn't.

Whereas if we just return the overall project usage and quota (current 
behavior) we get (used=10, quota=10) - which shows that the project quota is 
fully used.


It kind of feels as if really we need to return both the project and per user 
values if the results are going to be reliable in the face of 
project-user-quotas, but that led me to thinking whether a user that has been 
given a specific quota is meant to eb able to see the corresponding overall 
project level quota ?

The quota API itself allows a user to get either the project level quota or any 
per-user quota within that project - which does make all of the information 
available even if it is a tad odd that the default (no user specified) is to 
see the overall quota rather than the one that apples to the user making the  
request.   They can't however via the quotas API find out project level usage.

Thoughts on what the correct model is here ?

Phil
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev