From d7709cd0d09bb87637e3ec8422f249c3476f21d2 Mon Sep 17 00:00:00 2001 From: Arnaud Morin Date: Mon, 7 Oct 2019 11:57:52 +0200 Subject: [PATCH] B" (cherry picked from commit 372c1558005515eee58e9e49c590b5faa4962127) --- libvirt.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libvirt.pp b/libvirt.pp index c37b5ea..9054d17 100644 --- a/libvirt.pp +++ b/libvirt.pp @@ -35,8 +35,8 @@ # # [*libvirt_cpu_model_extra_flags*] # (optional) This allows specifying granular CPU feature flags when -# specifying CPU models. Only has effect if cpu_mode is not set -# to 'none'. +# specifying CPU models. Only valid, if cpu_mode and cpu_model +# attributes are specified and only if cpu_mode="custom". # Defaults to undef # # [*libvirt_snapshot_image_format*] @@ -278,14 +278,20 @@ class nova::compute::libvirt ( validate_legacy(String, 'validate_string', $libvirt_cpu_model) nova_config { 'libvirt/cpu_model': value => $libvirt_cpu_model; + 'libvirt/cpu_model_extra_flags': value => $libvirt_cpu_model_extra_flags; } } else { nova_config { 'libvirt/cpu_model': ensure => absent; + 'libvirt/cpu_model_extra_flags': ensure => absent; } if $libvirt_cpu_model { warning('$libvirt_cpu_model requires that $libvirt_cpu_mode => "custom" and will be ignored') } + + if $libvirt_cpu_model_extra_flags { + warning('$libvirt_cpu_model_extra_flags requires that $libvirt_cpu_mode => "custom" and will be ignored') + } } if $libvirt_cpu_mode_real != 'none' {