Comment 0 for bug 1864859

Revision history for this message
Mark Cunningham (mdscunningham) wrote :

This has been merged upstream as part of Train. This request is to add the configuration options to the Canonical Charmed Openstack version, to allow "SHELVED_OFFLOADED" VMs to not count against quota usage.

Merge Notes
--------------------------------------------------------------------------------
https://review.opendev.org/#/c/638073/
----------------------------------------
Count instances from mappings and cores/ram from placement

This counts instance mappings for counting quota usage for instances
and adds calls to placement for counting quota usage for cores and ram.

During an upgrade, if any un-migrated instance mappings are found (with
NULL user_id or NULL queued_for_delete fields), we will fall back to
the legacy counting method.

Counting quota usage from placement is opt-in via the
[quota]count_usage_from_placement configuration option because:

  * Though beneficial for multi-cell deployments to be resilient to
    down cells, the vast majority of deployments are single cell and
    will not be able to realize a down cells resiliency benefit and may
    prefer to keep legacy quota usage counting.

  * Usage for resizes will reflect resources being held on both the
    source and destination until the resize is confirmed or reverted.
    Operators may not want to enable counting from placement based on
    whether the behavior change is problematic for them.

  * Placement does not yet support the ability to partition resource
    providers from mulitple Nova deployments, so environments that are
    sharing a single placement deployment would see usage that
    aggregates all Nova deployments together. Such environments should
    not enable counting from placement.

  * Usage for unscheduled instances in ERROR state will not reflect
    resource consumption for cores and ram because the instance has no
    placement allocations.

  * Usage for instances in SHELVED_OFFLOADED state will not reflect
    resource consumption for cores and ram because the instance has no
    placement allocations. Note that because of this, it will be possible for a
    request to unshelve a server to be rejected if the user does not have
    enough quota available to support the cores and ram needed by the server to
    be unshelved.

Further specification/configuration information
--------------------------------------------------------------------------------
https://specs.openstack.org/openstack/nova-specs/specs/train/approved/count-quota-usage-from-placement.html
----------------------------------------