Files
nova/releasenotes/notes/remove-default-cputune-shares-values-85d5ddf4b8e24eaa.yaml
Artom Lifshitz f77a9fee5b libvirt: remove default cputune shares value
Previously, the libvirt driver defaulted to 1024 * (# of CPUs) for the
value of domain/cputune/shares in the libvirt XML. This value is then
passed directly by libvirt to the cgroups API. Cgroups v2 imposes a
maximum value of 10000 that can be passed in. This makes Nova
unable to launch instances with more than 9 CPUs on hosts that run
cgroups v2, like Ubuntu Jammy or RHEL 9.

Fix this by just removing the default entirely. Because there is no
longer a guarantee that domain/cputune will contain at least a shares
element, we can stop always generating the former, and only generate
it if it will actually contain something.

We can also make operators's lives easier by leveraging the fact that
we update the XML during live migration, so this patch also adds a
method to remove the shares value from the live migration XML if one
was not set as the quota:cpu_shares flavor extra spec.

For operators that *have* set this extra spec to something greater
than 10000, their flavors will have to get updates, and their
instances resized.

Partial-bug: 1978489
Change-Id: I49d757f5f261b3562ada27e6cf57284f615ca395
2022-07-14 11:55:40 -04:00

16 lines
888 B
YAML

upgrade:
- |
In the libvirt driver, the default value of the ``<cputune><shares>``
element has been removed, and is now left to libvirt to decide. This is
because allowed values are platform dependant, and the previous code was
not guaranteed to be supported on all platforms. If any of your flavors are
using the quota:cpu_shares extra spec, you may need to resize to a
supported value before upgrading.
To facilitate the transition to no Nova default for ``<cputune><shares>``,
its value will be removed during live migration unless a value is set in
the ``quota:cpu_shares`` extra spec. This can cause temporary CPU
starvation for the live migrated instance if other instances on the
destination host still have the old default ``<cputune><shares>`` value. To
fix this, hard reboot, cold migrate, or live migrate the other instances.