@@ -61,6 +61,66 @@ checks are made in order:
61
61
values from the database.
62
62
63
63
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
+
64
124
Known issues
65
125
============
66
126
0 commit comments