OpsGuide/Quotas

Quotas
To prevent system capacities from being exhausted without notification, you can set up quotas. Quotas are operational limits. For example, the number of gigabytes allowed per tenant can be controlled to ensure that a single tenant cannot consume all of the disk space. Quotas are currently enforced at the tenant (or project) level, rather than the user level.

Using the command-line interface, you can manage quotas for the OpenStack Compute service and the Block Storage service.

Typically, default values are changed because a tenant requires more than the OpenStack default of 10 volumes per tenant, or more than the OpenStack default of 1 TB of disk space on a compute node.

Set Image Quotas
You can restrict a project’s image storage by total number of bytes. Currently, this quota is applied cloud-wide, so if you were to set an Image quota limit of 5 GB, then all projects in your cloud will be able to store only 5 GB of images and snapshots.

To enable this feature, edit the  file, and under the   section, add:

For example, to restrict a project’s image storage to 5 GB, do this:

Set Compute Service Quotas
As an administrative user, you can update the Compute service quotas for an existing tenant, as well as update the quota defaults for a new tenant. See Compute quota descriptions.

View and update compute quotas for a tenant (project)
As an administrative user, you can use the nova quota-* commands, which are provided by the  package, to view and update tenant quotas.

To view and update default quota values


 * 1) List all default quotas for all tenants, as follows:
 * For example:
 * 1) Update a default value for a new tenant, as follows:
 * For example:
 * 1) Update a default value for a new tenant, as follows:
 * For example:
 * For example:

To view quota values for a tenant (project)
 * 1) Place the tenant ID in a variable:
 * 2) List the currently set quota values for a tenant, as follows:
 * For example:
 * For example:
 * For example:

To update quota values for a tenant (project)
 * 1) Obtain the tenant ID, as follows:
 * 2) Update a particular quota value, as follows:
 * For example:
 * To view a list of options for the  command, run:
 * For example:
 * To view a list of options for the  command, run:
 * To view a list of options for the  command, run:

Set Object Storage Quotas
There are currently two categories of quotas for Object Storage:


 * Container quotas
 * Limit the total size (in bytes) or number of objects that can be stored in a single container.


 * Account quotas
 * Limit the total size (in bytes) that a user has available in the Object Storage service.

To take advantage of either container quotas or account quotas, your Object Storage proxy server must have  or   (or both) added to the   pipeline. Each quota type also requires its own section in the  file:

To view and update Object Storage quotas, use the swift command provided by the  package. Any user included in the project can view the quotas placed on their project. To update Object Storage quotas on a project, you must have the role of ResellerAdmin in the project that the quota is being applied to.

To view account quotas placed on a project:

To apply or update account quotas on a project:

For example, to place a 5 GB quota on an account:

To verify the quota, run the swift stat command again:

Set Block Storage Quotas
As an administrative user, you can update the Block Storage service quotas for a tenant, as well as update the quota defaults for a new tenant. See Table: Block Storage quota descriptions.

View and update Block Storage quotas for a tenant (project)
As an administrative user, you can use the cinder quota-* commands, which are provided by the  package, to view and update tenant quotas.

To view and update default Block Storage quota values
 * 1) List all default quotas for all tenants, as follows:
 * 2) Obtain the tenant ID, as follows:
 * For example:
 * For example:
 * For example:


 * 1) To update a default value for a new tenant, update the property in the   file.

To view Block Storage quotas for a tenant (project)
 * 1) View quotas for the tenant, as follows:
 * For example:
 * For example:

To update Block Storage quotas for a tenant (project)
 * 1) Place the tenant ID in a variable:
 * 2) Update a particular quota value, as follows:
 * For example:
 * For example:
 * For example: