[ops] [nova] Default nova quota for project user

Sean McGinnis sean.mcginnis at gmx.com
Fri Apr 17 16:56:38 UTC 2020


On 4/17/20 11:52 AM, melanie witt wrote:
> On 4/17/20 08:51, Massimo Sgaravatto wrote:
>> Thanks a lot, but I am afraid I am missing something.
>> I have a project where the cores quota is 20.
>> This project has 2 users:
>>
>> [root at controller-01 ~]# openstack user list --project
>> b4a1039f2f7c419596662950d8a1d397
>> +----------------------------------+------------------+
>> | ID                               | Name             |
>> +----------------------------------+------------------+
>> | ab573ba3ea014b778193b6922ffffe6d | sgaravat at infn.it
>> <mailto:sgaravat at infn.it> |
>> | 27ae90b9f42547f094d8c899f23c31c2 | sgaraprj99       |
>> +----------------------------------+------------------+
>>
>> and by default each user is given 20 cores as quota [*]:
>>
>> I can decrease the cores quota for a specific user:
>>
>> [root at controller-01 ~]# nova quota-update --user
>> 27ae90b9f42547f094d8c899f23c31c2 --cores 2
>> b4a1039f2f7c419596662950d8a1d397
>>
>> and this works: the project keeps having 20 cores but that user can
>> instantiate at most 2 VCPUs
>>
>>
>> If I try the command you suggested:
>>
>>   openstack quota set --cores 2 b4a1039f2f7c419596662950d8a1d397
>>
>> it seems to me that the result is changing the quota (from 20 to 2)
>> for the project, while I would like to keep having 20 cores for the
>> project, and 2 cores for each user of that project
>
> Apologies, I made a mistake in thinking that a project quota of 2
> would give each user in the project of quota of 2. While it would, it
> would also not let the total usage in the project exceed 2 (so
> obviously that is not what you want).
>
> Unfortunately I don't think the quota system today can do what you
> would like here -- to have an automatic per-user quota of 2 while
> keeping the project total quota limited to 20. You would have to set a
> per-user quota of 2 on every user in the project separately and make
> sure to do it each time you add a new user to the project.
>
> -melanie
>
Not sure if this is relevant for you, but Cinder has the concept of
nested quotas. You can read more about the concept here:

https://docs.openstack.org/cinder/train/configuration/block-storage/nested-quota.html

This maybe gets closer to what you want, but as far as I know, it is a
Cinder-only thing.

There was an effort started to make this a common thing, but due to
resource limitations, I don't think that effort has made enough progress
to be of any use yet.

Sean




More information about the openstack-discuss mailing list