Chapter 4. Quota Management
4.1. Quota Management Copy linkLink copied to clipboard!
As a cloud administrator, you can set and manage quotas for a project. Each project is allocated resources, and project users are granted access to consume these resources. This enables multiple projects to use a single cloud without interfering with each other’s permissions and resources. A set of resource quotas are preconfigured when a new tenant is created. The quotas include the amount of VCPUs, instances, RAM, floating IPs, that can be assigned to tenants. Quotas can be enforced at both the tenant (or project) and the tenant-user level. Note that you can set or modify Compute and Block Storage quotas for new and existing tenants using the dashboard. See Chapter 5, Project Management for the procedure on how to set and update project quotas within the dashboard.
4.1.1. View Compute Quotas for a User Copy linkLink copied to clipboard!
Run the following command to list the currently set quota values for a user:
nova quota-show --user [USER] --tenant [TENANT]
$ nova quota-show --user [USER] --tenant [TENANT]
Example
4.1.2. Update Compute Quotas for a User Copy linkLink copied to clipboard!
Run the following commands to update a particular quota value:
nova quota-update --user [USER] --[QUOTA_NAME] [QUOTA_VALUE] [TENANT] nova quota-show --user [USER] --tenant [TENANT]
$ nova quota-update --user [USER] --[QUOTA_NAME] [QUOTA_VALUE] [TENANT]
$ nova quota-show --user [USER] --tenant [TENANT]
Example
To view a list of options for the quota-update command, run:
nova help quota-update
$ nova help quota-update
4.1.3. Set Object Storage Quotas for a User Copy linkLink copied to clipboard!
Object Storage quotas can be classified under the following categories:
- Container quotas - Limits the total size (in bytes) or number of objects that can be stored in a single container.
- Account quotas - Limits the total size (in bytes) that a user has available in the Object Storage service.
To set either container quotas or the account quotas, the Object Storage proxy server must have the parameters container_quotas
or account_quotas
(or both) added to the [pipeline:main]
section of the proxy-server.conf
file:
Use the following command to view and update the Object Storage quotas. All users included in a project can view the quotas placed on the project. To update the Object Storage quotas on a project, you must have the role of a ResellerAdmin in the project.
To view account quotas:
To update quotas:
swift post -m quota-bytes:<BYTES>
# swift post -m quota-bytes:<BYTES>
For example, to place a 5 GB quota on an account:
swift post -m quota-bytes:5368709120
# swift post -m quota-bytes:5368709120
To verify the quota, run the swift stat
command again: