diff --git a/manifests/compute/libvirt.pp b/manifests/compute/libvirt.pp index 0ba52ce40..fafa11e32 100644 --- a/manifests/compute/libvirt.pp +++ b/manifests/compute/libvirt.pp @@ -197,6 +197,14 @@ # Trusted Platform Module (TPM) functionality, runs as. # Defaults to $::os_service_default # +# [*max_queues*] +# (optional) The maximum number of virtio queue pairs that can be enabled +# when creating a multiqueue guest. The number of virtio queues allocated +# will be the lesser of the CPUs requested by the guest and the max value +# defined. By default, this value is set to none meaning the legacy limits +# based on the reported kernel major version will be used. +# Defaults to $::os_service_default +# # DEPRECATED PARAMETERS # # [*libvirt_virt_type*] @@ -325,6 +333,7 @@ class nova::compute::libvirt ( $log_filters = undef, $tls_priority = undef, $ovs_timeout = undef, + $max_queues = $::os_service_default, # DEPRECATED PARAMETERS $libvirt_virt_type = undef, $libvirt_cpu_mode = undef, @@ -580,6 +589,7 @@ in a future release. Use the enabled_perf_events parameter instead') 'libvirt/swtpm_enabled': value => $swtpm_enabled; 'libvirt/swtpm_user' : value => $swtpm_user; 'libvirt/swtpm_group': value => $swtpm_group; + 'libvirt/max_queues': value => $max_queues; } if $libvirt_cpu_model != undef { diff --git a/releasenotes/notes/compute-libvirt-max_queues-97a35922dbacb0b1.yaml b/releasenotes/notes/compute-libvirt-max_queues-97a35922dbacb0b1.yaml new file mode 100644 index 000000000..b21e43a99 --- /dev/null +++ b/releasenotes/notes/compute-libvirt-max_queues-97a35922dbacb0b1.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds parameter nova::compute::libvirt::max_queues to configure the libvirt + max_queues. diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index 13d50c4c9..15918f3a5 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -69,6 +69,7 @@ describe 'nova::compute::libvirt' do it { is_expected.to contain_nova_config('libvirt/swtpm_enabled').with_value('')} it { is_expected.to contain_nova_config('libvirt/swtpm_user').with_value('')} it { is_expected.to contain_nova_config('libvirt/swtpm_group').with_value('')} + it { is_expected.to contain_nova_config('libvirt/max_queues').with_value('')} it { is_expected.to contain_libvirtd_config('log_outputs').with_ensure('absent')} it { is_expected.to contain_libvirtd_config('log_filters').with_ensure('absent')} it { is_expected.to contain_libvirtd_config('tls_priority').with_ensure('absent')} @@ -108,6 +109,7 @@ describe 'nova::compute::libvirt' do :log_filters => '1:qemu', :tls_priority => 'NORMAL:-VERS-SSL3.0', :ovs_timeout => 10, + :max_queues => 4, } end @@ -139,6 +141,7 @@ describe 'nova::compute::libvirt' do it { is_expected.to contain_nova_config('libvirt/swtpm_enabled').with_value(true)} it { is_expected.to contain_nova_config('libvirt/swtpm_user').with_value('libvirt')} it { is_expected.to contain_nova_config('libvirt/swtpm_group').with_value('libvirt')} + it { is_expected.to contain_nova_config('libvirt/max_queues').with_value(4)} it { is_expected.to contain_libvirtd_config('log_outputs').with_value('"1:file:/var/log/libvirt/libvirtd.log"')} it { is_expected.to contain_libvirtd_config('log_filters').with_value('"1:qemu"')} it { is_expected.to contain_libvirtd_config('tls_priority').with_value('"NORMAL:-VERS-SSL3.0"')}