Fix pci config params name as mentioned in nova conf

This change, modifies name of params, as mentioned in sample
nova conf [1].
The parameter name in PCI section should be `alias` and
`passthrough_whitelist` instead of `pci_alias` and
`pci_passthrough_whitelist`.

[1] https://docs.openstack.org/nova/latest/sample_config.html

Change-Id: Ia7d8c0c900b3cb05d809e62e5c203d183b357fce
Related-Bug: #1696955
This commit is contained in:
Rajesh Tailor 2017-07-06 15:45:47 +05:30
parent 4431058899
commit 018c8a2900
5 changed files with 14 additions and 5 deletions

View File

@ -537,7 +537,7 @@ as a standalone service, or httpd for being run by a httpd server")
if $pci_alias {
nova_config {
'pci/pci_alias': value => join(any2array(check_array_of_hash($pci_alias)), ',');
'pci/alias': value => join(any2array(check_array_of_hash($pci_alias)), ',');
}
}

View File

@ -204,7 +204,7 @@ class nova::compute (
nova_config {
'DEFAULT/reserved_host_memory_mb': value => $reserved_host_memory;
'DEFAULT/heal_instance_info_cache_interval': value => $heal_instance_info_cache_interval;
'pci/pci_passthrough_whitelist': value => $pci_passthrough_real;
'pci/passthrough_whitelist': value => $pci_passthrough_real;
'DEFAULT/resize_confirm_window': value => $resize_confirm_window;
'DEFAULT/vcpu_pin_set': value => $vcpu_pin_set_real;
'DEFAULT/resume_guests_state_on_host_boot': value => $resume_guests_state_on_host_boot;

View File

@ -0,0 +1,9 @@
---
fixes:
- |
PCI configuration options name should be same as mentioned in nova
configuration file, since these are moved to PCI section.
Options affected by this change:
* ``pci_alias`` to ``alias``
* ``pci_passthrough_whitelist`` to ``passthrough_whitelist``

View File

@ -184,7 +184,7 @@ describe 'nova::api' do
end
it 'configures nova pci_alias entries' do
is_expected.to contain_nova_config('pci/pci_alias').with(
is_expected.to contain_nova_config('pci/alias').with(
'value' => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\",\"name\":\"graphic_card\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"name\":\"network_card\"}]"
)
end

View File

@ -131,7 +131,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value(true) }
it 'configures nova pci_passthrough_whitelist entries' do
is_expected.to contain_nova_config('pci/pci_passthrough_whitelist').with(
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(
'value' => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]"
)
end
@ -155,7 +155,7 @@ describe 'nova::compute' do
is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '<SERVICE DEFAULT>')
end
it 'clears pci_passthrough configuration' do
is_expected.to contain_nova_config('pci/pci_passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
end
end