Expose the Libvirt cpu_model and cpu_model_extra_flags options

Being able to set cpu_mode to "custom" is nice but doesn't do us
much good if users then have to resort to nova_nova_conf_overrides
to set cpu_model and/or cpu_model_extra_flags.

Instead, honor nova_cpu_model and nova_cpu_model_extra_flags variable.
Also add a release note saying that for those users who did previously
set these flags via nova_nova_conf_overrides, they should move
those bits to the newly understood variables.

Change-Id: I889e70826c5c631b86305b512b86fba2b89521b4
This commit is contained in:
Florian Haas 2018-11-06 09:49:56 +01:00
parent b1d5e97fd2
commit 58bad8e6b1
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,18 @@
---
features:
- You can now set the Libvirt CPU model and feature flags from the
appropriate entry under the ``nova_virt_types`` dictionary variable
(normally ``kvm``).
``nova_cpu_model`` is a string value that sets the CPU model; this
value is ignored if you set any ``nova_cpu_mode`` other than
``custom``.
``nova_cpu_model_extra_flags`` is a list that allows you to specify
extra CPU feature flags not normally passed through with
``host-model``, or the ``custom`` CPU model of your choice.
upgrade:
- If your configuration previously set the ``libvirt/cpu_model``
and/or ``libvirt/cpu_model_extra_flags`` variables in a
``nova_nova_conf_overrides`` dictionary, you should consider
moving those to ``nova_cpu_model`` and
``nova_cpu_model_extra_flags`` in the appropriate entry (normally
``kvm``) in the ``nova_virt_types`` dictionary.

View File

@ -258,6 +258,12 @@ virt_type = {{ nova_virt_type }}
remove_unused_resized_minimum_age_seconds = {{ nova_remove_unused_resized_minimum_age_seconds }}
{% if nova_cpu_mode is defined %}
cpu_mode = {{ nova_cpu_mode }}
{% if nova_cpu_mode == 'custom' %}
cpu_model = {{ nova_cpu_model }}
{% endif %}
{% if nova_cpu_model_extra_flags is defined %}
cpu_model_extra_flags = {{ nova_cpu_model_extra_flags | join(',') }}
{% endif %}
{% endif %}
{% if nova_libvirt_images_rbd_pool is defined %}