Add enable_qemu_monitor_announce_self workaround

This adds the enable_qemu_monitor_announce_self param
that will be introduced by [1].

[1] https://review.opendev.org/c/openstack/nova/+/741529

Depends-On: https://review.opendev.org/c/741529
Change-Id: Ia96e00ccc1b3f056605d63fe2570c4e795f509ab
This commit is contained in:
Tobias Urdin 2022-01-17 08:25:53 +00:00 committed by Takashi Kajinami
parent 44b3a2b331
commit 4a77e0a5b9
3 changed files with 26 additions and 8 deletions

View File

@ -5,16 +5,22 @@
# === Parameters:
#
# [*never_download_image_if_on_rbd*]
# (optional) refuse to boot an instance if it would require downloading from
# (Optional) refuse to boot an instance if it would require downloading from
# glance and uploading to ceph instead of a COW clone
# Defaults to $::os_service_default
#
# [*ensure_libvirt_rbd_instance_dir_cleanup*]
# (optional) Ensure the instance directory is removed during clean up when using
# (Optional) Ensure the instance directory is removed during clean up when using
# rbd. When enabled this workaround will ensure that the instance directory is
# always removed during cleanup on hosts using ``[libvirt]/images_type=rbd``
# Defaults to $::os_service_default
#
# [*enable_qemu_monitor_announce_self*]
# (Optional) If it is set to True the libvirt driver will try as a best effort to
# send the announce-self command to the QEMU monitor so that it generates RARP frames
# to update network switches in the post live migration phase on the destination.
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*enable_numa_live_migration*]
@ -22,10 +28,11 @@
# Defaults to undef
#
class nova::workarounds (
$never_download_image_if_on_rbd = $::os_service_default,
$never_download_image_if_on_rbd = $::os_service_default,
$ensure_libvirt_rbd_instance_dir_cleanup = $::os_service_default,
$enable_qemu_monitor_announce_self = $::os_service_default,
# DEPRECATED PARAMETER
$enable_numa_live_migration = undef,
$enable_numa_live_migration = undef,
) {
if $enable_numa_live_migration != undef {
@ -40,6 +47,8 @@ class nova::workarounds (
value => $never_download_image_if_on_rbd;
'workarounds/ensure_libvirt_rbd_instance_dir_cleanup':
value => $ensure_libvirt_rbd_instance_dir_cleanup;
'workarounds/enable_qemu_monitor_announce_self':
value => $enable_qemu_monitor_announce_self;
}
}

View File

@ -0,0 +1,6 @@
---
features:
- |
Added ``enable_qemu_monitor_announce_self`` paramter to
``nova::workarounds`` to configure the configuration option with the same
name.

View File

@ -12,20 +12,23 @@ describe 'nova::workarounds' do
it { is_expected.not_to contain_nova_config('workarounds/enable_numa_live_migration') }
it { is_expected.to contain_nova_config('workarounds/never_download_image_if_on_rbd').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('workarounds/ensure_libvirt_rbd_instance_dir_cleanup').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('workarounds/enable_qemu_monitor_announce_self').with_value('<SERVICE DEFAULT>') }
end
context 'with overridden parameters' do
let :params do
{
:enable_numa_live_migration => true,
:never_download_image_if_on_rbd => true,
:ensure_libvirt_rbd_instance_dir_cleanup => true
:enable_numa_live_migration => true,
:never_download_image_if_on_rbd => true,
:ensure_libvirt_rbd_instance_dir_cleanup => true,
:enable_qemu_monitor_announce_self => true,
}
end
it { is_expected.to contain_nova_config('workarounds/enable_numa_live_migration').with_value('true') }
it { is_expected.to contain_nova_config('workarounds/never_download_image_if_on_rbd').with_value('true') }
it { is_expected.to contain_nova_config('workarounds/ensure_libvirt_rbd_instance_dir_cleanup').with_value('true') }
it { is_expected.to contain_nova_config('workarounds/enable_qemu_monitor_announce_self').with_value(true) }
end
end
@ -38,7 +41,7 @@ describe 'nova::workarounds' do
facts.merge!(OSDefaults.get_facts())
end
it_configures 'nova::workarounds'
it_behaves_like 'nova::workarounds'
end
end
end