Browse Source

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

changes/24/758024/7
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
b4d86902b0
3 changed files with 17 additions and 1 deletions
  1. +1
    -0
      manifests/compute.pp
  2. +10
    -0
      manifests/workarounds.pp
  3. +6
    -1
      spec/classes/nova_workarounds_spec.rb

+ 1
- 0
manifests/compute.pp View File

@ -243,6 +243,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)


+ 10
- 0
manifests/workarounds.pp View File

@ -4,17 +4,27 @@
#
# === 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
#
# [*enable_numa_live_migration*]
# (optional) Whether to enable live migration for NUMA topology instances.
# Defaults to false
#
class nova::workarounds (
$enable_numa_live_migration = false,
$never_download_image_if_on_rbd = $::os_service_default,
) {
nova_config {
'workarounds/enable_numa_live_migration': value => $enable_numa_live_migration;
}
nova_config {
'workarounds/never_download_image_if_on_rbd': value => $never_download_image_if_on_rbd;
}
}

+ 6
- 1
spec/classes/nova_workarounds_spec.rb View File

@ -10,14 +10,19 @@ describe 'nova::workarounds' do
context 'with default parameters' do
it { is_expected.to contain_nova_config('workarounds/enable_numa_live_migration').with_value(false) }
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


Loading…
Cancel
Save