diff --git a/manifests/compute/libvirt.pp b/manifests/compute/libvirt.pp index 88768fa88..3e26ef048 100644 --- a/manifests/compute/libvirt.pp +++ b/manifests/compute/libvirt.pp @@ -213,6 +213,13 @@ # run concurrently on this compute host. # Defaults to $::os_service_default # +# [*wait_soft_reboot_seconds*] +# (optional) Number of seconds to wait for instance to shut down after soft +# reboot request is made. +# Defaults to $::os_service_default +# +# DEPRECATED PARAMETRS +# # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html @@ -276,6 +283,7 @@ class nova::compute::libvirt ( $swtpm_group = $::os_service_default, $max_queues = $::os_service_default, $num_memory_encrypted_guests = $::os_service_default, + $wait_soft_reboot_seconds = $::os_service_default, # DEPRECATED PARAMETERS $log_outputs = undef, $log_filters = undef, @@ -387,6 +395,7 @@ class nova::compute::libvirt ( 'libvirt/swtpm_group': value => $swtpm_group; 'libvirt/max_queues': value => $max_queues; 'libvirt/num_memory_encrypted_guests': value => $num_memory_encrypted_guests; + 'libvirt/wait_soft_reboot_seconds': value => $wait_soft_reboot_seconds; } validate_legacy(Array, 'validate_array', $cpu_models) diff --git a/releasenotes/notes/libvirt-wait_soft_reboot_seconds-596390a15caf1c1e.yaml b/releasenotes/notes/libvirt-wait_soft_reboot_seconds-596390a15caf1c1e.yaml new file mode 100644 index 000000000..69b20f89b --- /dev/null +++ b/releasenotes/notes/libvirt-wait_soft_reboot_seconds-596390a15caf1c1e.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``nova::compute::libvirt::wait_soft_reboot_seconds`` parameter has + been added. diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index d8d131468..4effe98d1 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -75,6 +75,7 @@ describe 'nova::compute::libvirt' do 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_nova_config('libvirt/num_memory_encrypted_guests').with_value('')} + it { is_expected.to contain_nova_config('libvirt/wait_soft_reboot_seconds').with_value('')} end describe 'with params' do @@ -117,6 +118,7 @@ describe 'nova::compute::libvirt' do :max_queues => 4, :num_memory_encrypted_guests => 255, :modular_libvirt => true, + :wait_soft_reboot_seconds => 120, } end @@ -153,6 +155,8 @@ describe 'nova::compute::libvirt' do 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_nova_config('libvirt/num_memory_encrypted_guests').with_value(255)} + it { is_expected.to contain_nova_config('libvirt/wait_soft_reboot_seconds').with_value(120)} + it { is_expected.to contain_service('libvirt').with( :name => 'custom_service',