diff --git a/manifests/compute.pp b/manifests/compute.pp index b7b689e64..e70065d0a 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -94,6 +94,15 @@ # (optional) Config drive format. One of iso9660 (default) or vfat # Defaults to undef # +# [*update_resources_interval*] +# (optional) Interval for updating compute resources. +# This option specifies how often the update_available_resources periodic +# task should run. A number less than 0 means to disable the task completely +# Leaving this at the default of 0 will cause this to run at the default +# periodic interval. Setting it to any positive value will cause it to run +# at approximately that number of seconds. +# Defaults to $::os_service_default +# # [*reboot_timeout*] # (optioanl) Time interval after which an instance is hard rebooted # automatically. Setting this option to a time period in seconds will @@ -303,6 +312,7 @@ class nova::compute ( $reserved_host_disk = $::os_service_default, $heal_instance_info_cache_interval = $::os_service_default, $config_drive_format = $::os_service_default, + $update_resources_interval = $::os_service_default, $reboot_timeout = $::os_service_default, $instance_build_timeout = $::os_service_default, $rescue_timeout = $::os_service_default, @@ -463,6 +473,7 @@ Use the same parameter in nova::api class.') 'DEFAULT/reserved_host_disk_mb': value => $reserved_host_disk; 'DEFAULT/reserved_huge_pages': value => $reserved_huge_pages_real; 'DEFAULT/heal_instance_info_cache_interval': value => $heal_instance_info_cache_interval; + 'DEFAULT/update_resources_interval': value => $update_resources_interval; 'DEFAULT/reboot_timeout': value => $reboot_timeout; 'DEFAULT/instance_build_timeout': value => $instance_build_timeout; 'DEFAULT/rescue_timeout': value => $rescue_timeout; diff --git a/releasenotes/notes/add_compute_update_resources_interval_option-d09c6c88a99da827.yaml b/releasenotes/notes/add_compute_update_resources_interval_option-d09c6c88a99da827.yaml new file mode 100644 index 000000000..fe10feea8 --- /dev/null +++ b/releasenotes/notes/add_compute_update_resources_interval_option-d09c6c88a99da827.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Add the ``update_resources_interval`` parameter which specifies + the interval in seconds for updating compute resources. diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 3e73f6190..c484f107f 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -49,6 +49,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/reserved_host_disk_mb').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/reserved_huge_pages').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/heal_instance_info_cache_interval').with_value('') } + it { is_expected.to contain_nova_config('DEFAULT/update_resources_interval').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/reboot_timeout').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/instance_build_timeout').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/rescue_timeout').with_value('') } @@ -98,6 +99,7 @@ describe 'nova::compute' do :reserved_host_disk => '20', :heal_instance_info_cache_interval => '120', :config_drive_format => 'vfat', + :update_resources_interval => '300', :reboot_timeout => '180', :instance_build_timeout => '300', :rescue_timeout => '120', @@ -166,6 +168,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('0') } it { is_expected.to contain_nova_config('DEFAULT/reserved_host_disk_mb').with_value('20') } it { is_expected.to contain_nova_config('DEFAULT/heal_instance_info_cache_interval').with_value('120') } + it { is_expected.to contain_nova_config('DEFAULT/update_resources_interval').with_value('300') } it { is_expected.to contain_nova_config('DEFAULT/reboot_timeout').with_value('180') } it { is_expected.to contain_nova_config('DEFAULT/instance_build_timeout').with_value('300') } it { is_expected.to contain_nova_config('DEFAULT/rescue_timeout').with_value('120') }