Skip to content

Commit e3aadaf

Browse files
committed
Add documentation for counting quota usage from placement
Part of blueprint count-quota-usage-from-placement Change-Id: I88919634551b654b6cfdd377ac5de78106bc894f
1 parent 799c0e4 commit e3aadaf

File tree

3 files changed

+73
-7
lines changed

3 files changed

+73
-7
lines changed

doc/source/admin/cells.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ Known issues
8181
if a tenant has used all of their quota and part of it is in cell A and cell A
8282
goes offline temporarily, that tenant will suddenly be able to allocate more
8383
resources than their limit (assuming cell A returns, the tenant will have more
84-
resources allocated than their allowed quota). In the future, this will be solved
85-
by using placement and nova_api databases for counting quotas so as to remove the
86-
dependency on individual cells. See `counting quotas from placement`_ for more details.
84+
resources allocated than their allowed quota).
8785

88-
.. _counting quotas from placement: https://specs.openstack.org/openstack/nova-specs/specs/stein/approved/count-quota-usage-from-placement.html
86+
.. note:: Starting in the Train (20.0.0) release, it is possible to
87+
configure counting of quota usage from the placement service and
88+
API database to make quota usage calculations resilient to down or
89+
poor-performing cells in a multi-cell environment. See the
90+
:doc:`quotas documentation</user/quotas>` for more details.

doc/source/user/cellsv2-layout.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,13 @@ database. This means that a multi-cell environment may incorrectly
260260
calculate the usage of a tenant if one of the cells is unreachable, as
261261
those resources cannot be counted. In this case, the tenant may be
262262
able to consume more resource from one of the available cells, putting
263-
them far over quota when the unreachable cell returns. In the future,
264-
placement will provide us with a consistent way to calculate usage
265-
independent of the actual cell being reachable.
263+
them far over quota when the unreachable cell returns.
264+
265+
.. note:: Starting in the Train (20.0.0) release, it is possible to configure
266+
counting of quota usage from the placement service and API database
267+
to make quota usage calculations resilient to down or poor-performing
268+
cells in a multi-cell environment. See the
269+
:doc:`quotas documentation<quotas>` for more details.
266270

267271
Performance of listing instances
268272
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/source/user/quotas.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,66 @@ checks are made in order:
6161
values from the database.
6262

6363

64+
Quota usage from placement
65+
==========================
66+
67+
Starting in the Train (20.0.0) release, it is possible to configure quota usage
68+
counting of cores and ram from the placement service and instances from
69+
instance mappings in the API database instead of counting resources from cell
70+
databases. This makes quota usage counting resilient in the presence of `down
71+
or poor-performing cells`_.
72+
73+
Quota usage counting from placement is opt-in via configuration option:
74+
75+
.. code-block:: ini
76+
77+
[quota]
78+
count_usage_from_placement = True
79+
80+
There are some things to note when opting in to counting quota usage from
81+
placement:
82+
83+
* Counted usage will not be accurate in an environment where multiple Nova
84+
deployments are sharing a placement deployment because currently placement
85+
has no way of partitioning resource providers between different Nova
86+
deployments. Operators who are running multiple Nova deployments that share a
87+
placement deployment should not set the
88+
:oslo.config:option:`quota.count_usage_from_placement` configuration option
89+
to ``True``.
90+
91+
* Behavior will be different for resizes. During a resize, resource allocations
92+
are held on both the source and destination (even on the same host, see
93+
https://bugs.launchpad.net/nova/+bug/1790204) until the resize is confirmed
94+
or reverted. Quota usage will be inflated for servers in this state and
95+
operators should weigh the advantages and disadvantages before enabling
96+
:oslo.config:option:`quota.count_usage_from_placement`.
97+
98+
* The ``populate_queued_for_delete`` and ``populate_user_id`` online data
99+
migrations must be completed before usage can be counted from placement.
100+
Until the data migration is complete, the system will fall back to legacy
101+
quota usage counting from cell databases depending on the result of an EXISTS
102+
database query during each quota check, if
103+
:oslo.config:option:`quota.count_usage_from_placement` is set to ``True``.
104+
Operators who want to avoid the performance hit from the EXISTS queries
105+
should wait to set the :oslo.config:option:`quota.count_usage_from_placement`
106+
configuration option to ``True`` until after they have completed their online
107+
data migrations via ``nova-manage db online_data_migrations``.
108+
109+
* Behavior will be different for unscheduled servers in ``ERROR`` state. A
110+
server in ``ERROR`` state that has never been scheduled to a compute host
111+
will not have placement allocations, so it will not consume quota usage for
112+
cores and ram.
113+
114+
* Behavior will be different for servers in ``SHELVED_OFFLOADED`` state. A
115+
server in ``SHELVED_OFFLOADED`` state will not have placement allocations, so
116+
it will not consume quota usage for cores and ram. Note that because of this,
117+
it will be possible for a request to unshelve a server to be rejected if the
118+
user does not have enough quota available to support the cores and ram needed
119+
by the server to be unshelved.
120+
121+
.. _down or poor-performing cells: https://developer.openstack.org/api-guide/compute/down_cells.html
122+
123+
64124
Known issues
65125
============
66126

0 commit comments

Comments
 (0)