vcpu_pin_set gets set under [compute] instead of [DEFAULT]

vcpu_pin_set is located in [DEFAULT] but
I40e0ed0bba93bfcdc4cf157195c3e9fbcfce0776 moved it do be
set in [compute] section, which is wrong.

Change-Id: I7ec709d012fd9b1a8ad0bc0c3fb46034e6f32148
Closes-Bug: #1856322
(cherry picked from commit d20fe58388)
This commit is contained in:
Martin Schuppert 2019-12-13 15:31:48 +01:00
parent 7d002fd713
commit 721ca2a7a1
2 changed files with 7 additions and 7 deletions

View File

@ -289,7 +289,7 @@ class nova::compute (
nova_config {
'compute/cpu_shared_set': value => $cpu_shared_set_real;
'compute/cpu_dedicated_set': value => $cpu_dedicated_set_real;
'compute/vcpu_pin_set': value => $vcpu_pin_set_real;
'DEFAULT/vcpu_pin_set': value => $vcpu_pin_set_real;
}
} else {
# handle the following conditions:
@ -300,7 +300,7 @@ class nova::compute (
nova_config {
'compute/cpu_shared_set': value => $cpu_shared_set_real;
'compute/cpu_dedicated_set': value => $cpu_dedicated_set_real;
'compute/vcpu_pin_set': ensure => absent; # when undef, don't include in conf.
'DEFAULT/vcpu_pin_set': ensure => absent; # when undef, don't include in conf.
}
}

View File

@ -212,7 +212,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('compute/cpu_shared_set').with(:value => '4-12,^8,15') }
it { is_expected.to contain_nova_config('compute/cpu_dedicated_set').with(:value => '2-10,^5,14') }
it { is_expected.to contain_nova_config('compute/vcpu_pin_set').with(:ensure => 'absent') }
it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:ensure => 'absent') }
end
context 'when cpu_dedicated_set is defined but cpu_shared_set is not' do
@ -222,7 +222,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('compute/cpu_dedicated_set').with(:value => '4-12,^8,15') }
it { is_expected.to contain_nova_config('compute/cpu_shared_set').with(:value => '<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('compute/vcpu_pin_set').with(:ensure => 'absent') }
it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:ensure => 'absent') }
end
context 'when cpu_shared_set is defined, but cpu_dedicated_set and vcpu_pin_set are not' do
@ -232,7 +232,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('compute/cpu_shared_set').with(:value => '4-12,^8,15') }
it { is_expected.to contain_nova_config('compute/cpu_dedicated_set').with(:value => '<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('compute/vcpu_pin_set').with(:ensure => 'absent') }
it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:ensure => 'absent') }
end
context 'when cpu_shared_set and vcpu_pin_set are defined, but cpu_dedicated_set is not' do
@ -242,7 +242,7 @@ describe 'nova::compute' do
end
it { is_expected.to contain_nova_config('compute/cpu_shared_set').with(:value => '4-12,^8,15') }
it { is_expected.to contain_nova_config('compute/vcpu_pin_set').with(:value => '2-10,^5,14') }
it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '2-10,^5,14') }
it { is_expected.to contain_nova_config('compute/cpu_dedicated_set').with(:value => '<SERVICE DEFAULT>') }
end
@ -251,7 +251,7 @@ describe 'nova::compute' do
{ :vcpu_pin_set => ['4-12','^8','15'] }
end
it { is_expected.to contain_nova_config('compute/vcpu_pin_set').with(:value => '4-12,^8,15') }
it { is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '4-12,^8,15') }
it { is_expected.to contain_nova_config('compute/cpu_shared_set').with(:value => '<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('compute/cpu_dedicated_set').with(:value => '<SERVICE DEFAULT>') }
end