18
18
Nova uses a quota system for setting limits on resources such as number of
19
19
instances or amount of CPU that a specific project or user can use.
20
20
21
- Quotas are enforced by making a claim, or reservation, on resources when a
22
- request is made, such as creating a new server. If the claim fails, the request
23
- is rejected. If the reservation succeeds then the operation progresses until
24
- such a point that the reservation is either converted into usage (the operation
25
- was successful) or rolled back (the operation failed).
26
-
27
- Typically the quota reservation is made in the nova-api service and the usage
28
- or rollback is performed in the nova-compute service, at least when dealing
29
- with a server creation or move operation.
30
-
31
- Quota limits and usage can be retrieved via the ``limits `` REST API.
21
+ Starting in the 16.0.0 Pike release the quota calculation system in nova was
22
+ overhauled and the old reserve/commit/rollback flow was changed to `count
23
+ resource usage `_ at the point of whatever operation is being performed, such
24
+ as creating or resizing a server. A check will be performed by counting
25
+ current usage for the relevant resource and then if
26
+ :oslo.config:option: `quota.recheck_quota ` is True (it is by default) another
27
+ check will be performed to ensure the initial check is still valid.
28
+
29
+ By default resource usage is counted using the API and cell databases but
30
+ nova can be configured to count some resource usage without using the cell
31
+ databases, see `Quota usage from placement `_ for details.
32
+
33
+ Quota limits and usage can be retrieved via the `limits `_ REST API. Quota
34
+ limits can be set per-tenant using the `quota sets `_ REST API or per class
35
+ (all tenants) using the `quota class sets `_ API.
36
+
37
+ .. _count resource usage : https://specs.openstack.org/openstack/nova-specs/specs/pike/implemented/cells-count-resources-to-check-quota-in-api.html
38
+ .. _limits : https://developer.openstack.org/api-ref/compute/#limits-limits
39
+ .. _quota sets : https://developer.openstack.org/api-ref/compute/#quota-sets-os-quota-sets
40
+ .. _quota class sets : https://developer.openstack.org/api-ref/compute/#quota-class-sets-os-quota-class-sets
32
41
33
42
Checking quota
34
43
==============
@@ -49,8 +58,8 @@ checks are made in order:
49
58
50
59
openstack quota set --class --instances 5 default
51
60
52
- * If the above does not provide a resource limit, then rely on the `` quota_* ``
53
- configuration options for the default limit.
61
+ * If the above does not provide a resource limit, then rely on the
62
+ :oslo.config:group: ` quota ` configuration options for the default limit.
54
63
55
64
.. note :: The API sets the limit in the `quota_classes` table. Once a default
56
65
limit is set via the `default ` quota class, that takes precedence over
@@ -132,7 +141,11 @@ See the :ref:`cells documentation <cells-counting-quotas>` for details.
132
141
Future plans
133
142
============
134
143
135
- TODO: talk about quotas in the `resource counting spec `_ and `nested quotas `_
144
+ Hierarchical quotas
145
+ -------------------
146
+
147
+ There has long been a desire to support hierarchical or nested quotas
148
+ leveraging support in the identity service for hierarchical projects.
149
+ See the `unified limits `_ spec for details.
136
150
137
- .. _resource counting spec : https://specs.openstack.org/openstack/nova-specs/specs/ocata/approved/cells-count-resources-to-check-quota-in-api.html
138
- .. _nested quotas : https://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/nested-quota-driver-api.html
151
+ .. _unified limits : https://review.opendev.org/#/c/602201/
0 commit comments