Add support for [workarounds] skip_hypervisor_version_check_on_lm

This change introduces support for the new workarounds option, which
allows users to migrate instances from a newer version of hypervisor
to an old version.

Depends-on: https://review.opendev.org/851034
Change-Id: I6a8b1229bc7b759d6d4ac737758ca8331c192f2d
This commit is contained in:
Takashi Kajinami 2022-08-09 08:59:49 +09:00
parent 35066808de
commit 33dffab3da
3 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,11 @@
# before compute nodes have been able to update their service record.
# Defaults to $::os_service_default
#
# [*skip_hypervisor_version_check_on_lm*]
# (Optional) When this is enabled, it will skip version-checking of
# hypervisors during live migration.
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*enable_numa_live_migration*]
@ -45,6 +50,7 @@ class nova::workarounds (
$enable_qemu_monitor_announce_self = $::os_service_default,
$wait_for_vif_plugged_event_during_hard_reboot = $::os_service_default,
$disable_compute_service_check_for_ffu = $::os_service_default,
$skip_hypervisor_version_check_on_lm = $::os_service_default,
# DEPRECATED PARAMETER
$enable_numa_live_migration = undef,
) {
@ -67,6 +73,8 @@ class nova::workarounds (
value => join(any2array($wait_for_vif_plugged_event_during_hard_reboot), ',');
'workarounds/disable_compute_service_check_for_ffu':
value => $disable_compute_service_check_for_ffu;
'workarounds/skip_hypervisor_version_check_on_lm':
value => $skip_hypervisor_version_check_on_lm;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``nova::compute::skip_hypervisor_version_check_on_lm`` parameter
has been added.

View File

@ -15,6 +15,7 @@ describe 'nova::workarounds' do
it { is_expected.to contain_nova_config('workarounds/enable_qemu_monitor_announce_self').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('workarounds/wait_for_vif_plugged_event_during_hard_reboot').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('workarounds/disable_compute_service_check_for_ffu').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('workarounds/skip_hypervisor_version_check_on_lm').with_value('<SERVICE DEFAULT>') }
end
context 'with overridden parameters' do
@ -26,6 +27,7 @@ describe 'nova::workarounds' do
:enable_qemu_monitor_announce_self => true,
:wait_for_vif_plugged_event_during_hard_reboot => ['normal', 'direct'],
:disable_compute_service_check_for_ffu => true,
:skip_hypervisor_version_check_on_lm => true,
}
end
@ -35,6 +37,7 @@ describe 'nova::workarounds' do
it { is_expected.to contain_nova_config('workarounds/enable_qemu_monitor_announce_self').with_value(true) }
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) }
end
end