Merge "Expose nova config option [workaround]/never_download_image_if_on_rbd" into stable/victoria

This commit is contained in:
Zuul 2020-10-30 23:16:21 +00:00 committed by Gerrit Code Review
commit b3b2d770ce
3 changed files with 19 additions and 3 deletions

View File

@ -261,6 +261,7 @@ class nova::compute (
include nova::deps
include nova::params
include nova::workarounds
$cpu_shared_set_real = pick(join(any2array($cpu_shared_set), ','), $::os_service_default)
$cpu_dedicated_set_real = pick(join(any2array($cpu_dedicated_set), ','), $::os_service_default)

View File

@ -4,6 +4,11 @@
#
# === Parameters:
#
# [*never_download_image_if_on_rbd*]
# (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
#
# DEPRECATED
#
# [*enable_numa_live_migration*]
@ -11,6 +16,7 @@
# Defaults to undef
#
class nova::workarounds (
$never_download_image_if_on_rbd = $::os_service_default,
# DEPRECATED PARAMETER
$enable_numa_live_migration = undef,
) {
@ -22,4 +28,8 @@ class nova::workarounds (
}
}
nova_config {
'workarounds/never_download_image_if_on_rbd': value => $never_download_image_if_on_rbd;
}
}

View File

@ -9,15 +9,20 @@ describe 'nova::workarounds' do
shared_examples 'nova::workarounds' do
context 'with default parameters' do
it { is_expected.not_to contain_resources('nova_config') }
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>') }
end
context 'with overridden parameters' do
let :params do
{ :enable_numa_live_migration => true,}
{
:enable_numa_live_migration => true,
:never_download_image_if_on_rbd => 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') }
end
end