diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 0dc0511ee..bc7d8c6bf 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -38,6 +38,7 @@ class nova::conductor( include ::nova::deps include ::nova::db include ::nova::params + include ::nova::workarounds nova::generic_service { 'conductor': enabled => $enabled, diff --git a/manifests/workarounds.pp b/manifests/workarounds.pp new file mode 100644 index 000000000..923ac0a24 --- /dev/null +++ b/manifests/workarounds.pp @@ -0,0 +1,20 @@ +# == Class: nova::workarounds +# +# nova workarounds configuration +# +# === Parameters: +# +# [*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, +) { + + nova_config { + 'workarounds/enable_numa_live_migration': value => $enable_numa_live_migration; + } + +} + diff --git a/releasenotes/notes/disable-live-migration-with-numa-66145efd46bdd146.yaml b/releasenotes/notes/disable-live-migration-with-numa-66145efd46bdd146.yaml new file mode 100644 index 000000000..5f20a58d2 --- /dev/null +++ b/releasenotes/notes/disable-live-migration-with-numa-66145efd46bdd146.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + Add support to enable/disable live-migration for NUMA topology instances + + Add configuration parameter `workarounds/enable_numa_live_migration` + (defaults to false) which allows to enable/disable live-migration + for NUMA topology instances. + diff --git a/spec/classes/nova_workarounds_spec.rb b/spec/classes/nova_workarounds_spec.rb new file mode 100644 index 000000000..8a52f58b3 --- /dev/null +++ b/spec/classes/nova_workarounds_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +describe 'nova::workarounds' do + + let :params do + {} + end + + shared_examples 'nova::workarounds' do + + context 'with default parameters' do + it { is_expected.to contain_nova_config('workarounds/enable_numa_live_migration').with_value(false) } + end + + context 'with overridden parameters' do + let :params do + { :enable_numa_live_migration => true,} + end + + it { is_expected.to contain_nova_config('workarounds/enable_numa_live_migration').with_value('true') } + end + + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge!(OSDefaults.get_facts()) + end + + it_configures 'nova::workarounds' + end + end +end