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

Massimo Sgaravatto massimo.sgaravatto at gmail.com
Fri Apr 17 15:51:38 UTC 2020


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 |
| 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

Thanks, Massimo




[*]
[root at controller-01 ~]# nova quota-show --tenant
b4a1039f2f7c419596662950d8a1d397
+----------------------+-------+
| Quota                | Limit |
+----------------------+-------+
| instances            | 10    |
| cores                | 20    |
| ram                  | 20480 |
| metadata_items       | 128   |
| key_pairs            | 100   |
| server_groups        | 10    |
| server_group_members | 10    |
+----------------------+-------+
[root at controller-01 ~]# nova quota-show --tenant
b4a1039f2f7c419596662950d8a1d397 --user ab573ba3ea014b778193b6922ffffe6d
+----------------------+-------+
| Quota                | Limit |
+----------------------+-------+
| instances            | 10    |
| cores                | 20    |
| ram                  | 20480 |
| metadata_items       | 128   |
| key_pairs            | 100   |
| server_groups        | 10    |
| server_group_members | 10    |
+----------------------+-------+

On Fri, Apr 17, 2020 at 4:23 PM melanie witt <melwittt at gmail.com> wrote:

> On 4/17/20 07:01, Massimo Sgaravatto wrote:
> > Hello
> >
> > As far as I understand by default each project user is given the quota
> > of the whole project.
> > Is it possible to set a different default quota for users of a certain
> > project  ?
> > And in general I'd like to be able to define different default values
> > for different projects
> >
> > In:
> >
> > https://docs.openstack.org/nova/latest/admin/quotas.html
> >
> > it is explained how to update the quota for a specific project user, but
> > I can't find how to set the default user quota for a given project
>
> Hi, the steps for updating quota for a specific project are on the doc
> you linked here:
>
>
> https://docs.openstack.org/nova/latest/admin/quotas.html#view-and-update-quota-values-for-a-project-or-class
>
> $ openstack quota set --QUOTA QUOTA_VALUE PROJECT
>
> This will change the default quota for that project, so all existing
> users in the project will get that quota and all future users in the
> project will get that quota.
>
> Note that the ability to set specific user quota [1] is planned to be
> removed in a future release:
>
> "User-specific quotas are legacy and will be removed when migration to
> unified limits is complete. User-specific quotas were added as a way to
> provide two-level hierarchical quotas and this feature is already being
> offered in unified limits. For this reason, the below commands have not
> and will not be ported to openstackclient."
>
> Hope that helps.
>
> -melanie
>
> [1]
>
> https://docs.openstack.org/nova/latest/admin/quotas.html#view-and-update-quota-values-for-a-project-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200417/92614f3c/attachment.html>


More information about the openstack-discuss mailing list