From d24ca46009fd8c82777d4ae1828beb706db5e38a Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 5 Feb 2025 16:07:08 +0100 Subject: [PATCH] Add skip CPU compare to nova::workarounds This adds the skip_cpu_compare_on_dest and skip_cpu_compare_at_startup parameter to the nova::workarounds class. Change-Id: I7997067800f0e1f6563e164f8c02a15680b3aa9b --- manifests/workarounds.pp | 18 ++++++++++++++++++ ...unds-skip-cpu-compare-64471cc75d3175b3.yaml | 5 +++++ spec/classes/nova_workarounds_spec.rb | 6 ++++++ 3 files changed, 29 insertions(+) create mode 100644 releasenotes/notes/workarounds-skip-cpu-compare-64471cc75d3175b3.yaml diff --git a/manifests/workarounds.pp b/manifests/workarounds.pp index 3e2f320e2..736b6bf4f 100644 --- a/manifests/workarounds.pp +++ b/manifests/workarounds.pp @@ -48,6 +48,18 @@ # hypervisors during live migration. # Defaults to $facts['os_service_default'] # +# [*skip_cpu_compare_on_dest*] +# (Optional) With the libvirt driver, during live migration, skip comparing guest CPU +# with the destination host. When using QEMU >= 2.9 and libvirt >= +# 4.4.0, libvirt will do the correct thing with respect to checking CPU +# compatibility on the destination host during live migration. +# Defaults to $facts['os_service_default'] +# +# [*skip_cpu_compare_at_startup*] +# (Optional) This will skip the CPU comparison call at the startup of Compute +# service and lets libvirt handle it. +# Defaults to $facts['os_service_default'] +# # DEPRECATED # # [*enable_numa_live_migration*] @@ -63,6 +75,8 @@ class nova::workarounds ( $wait_for_vif_plugged_event_during_hard_reboot = $facts['os_service_default'], $disable_compute_service_check_for_ffu = $facts['os_service_default'], $skip_hypervisor_version_check_on_lm = $facts['os_service_default'], + $skip_cpu_compare_on_dest = $facts['os_service_default'], + $skip_cpu_compare_at_startup = $facts['os_service_default'], # DEPRECATED PARAMETER $enable_numa_live_migration = undef, ) { @@ -91,6 +105,10 @@ class nova::workarounds ( value => $disable_compute_service_check_for_ffu; 'workarounds/skip_hypervisor_version_check_on_lm': value => $skip_hypervisor_version_check_on_lm; + 'workarounds/skip_cpu_compare_on_dest': + value => $skip_cpu_compare_on_dest; + 'workarounds/skip_cpu_compare_at_startup': + value => $skip_cpu_compare_at_startup; } } diff --git a/releasenotes/notes/workarounds-skip-cpu-compare-64471cc75d3175b3.yaml b/releasenotes/notes/workarounds-skip-cpu-compare-64471cc75d3175b3.yaml new file mode 100644 index 000000000..759f19314 --- /dev/null +++ b/releasenotes/notes/workarounds-skip-cpu-compare-64471cc75d3175b3.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added parameters ``skip_cpu_compare_on_dest`` and ``skip_cpu_compare_at_startup`` + to the ``nova::workarounds`` class. diff --git a/spec/classes/nova_workarounds_spec.rb b/spec/classes/nova_workarounds_spec.rb index 46e055574..25d5144f1 100644 --- a/spec/classes/nova_workarounds_spec.rb +++ b/spec/classes/nova_workarounds_spec.rb @@ -18,6 +18,8 @@ describe 'nova::workarounds' do it { is_expected.to contain_nova_config('workarounds/wait_for_vif_plugged_event_during_hard_reboot').with_value('') } it { is_expected.to contain_nova_config('workarounds/disable_compute_service_check_for_ffu').with_value('') } it { is_expected.to contain_nova_config('workarounds/skip_hypervisor_version_check_on_lm').with_value('') } + it { is_expected.to contain_nova_config('workarounds/skip_cpu_compare_on_dest').with_value('') } + it { is_expected.to contain_nova_config('workarounds/skip_cpu_compare_at_startup').with_value('') } end context 'with overridden parameters' do @@ -32,6 +34,8 @@ describe 'nova::workarounds' do :wait_for_vif_plugged_event_during_hard_reboot => ['normal', 'direct'], :disable_compute_service_check_for_ffu => true, :skip_hypervisor_version_check_on_lm => true, + :skip_cpu_compare_on_dest => true, + :skip_cpu_compare_at_startup => true, } end @@ -44,6 +48,8 @@ describe 'nova::workarounds' do it { is_expected.to contain_nova_config('workarounds/wait_for_vif_plugged_event_during_hard_reboot').with_value('normal,direct') } it { is_expected.to contain_nova_config('workarounds/disable_compute_service_check_for_ffu').with_value(true) } it { is_expected.to contain_nova_config('workarounds/skip_hypervisor_version_check_on_lm').with_value(true) } + it { is_expected.to contain_nova_config('workarounds/skip_cpu_compare_on_dest').with_value(true) } + it { is_expected.to contain_nova_config('workarounds/skip_cpu_compare_at_startup').with_value(true) } end end