diff --git a/manifests/compute.pp b/manifests/compute.pp index 434dc0d39..c742485e2 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -147,6 +147,11 @@ # (optional) Maximum number of greenthreads to use when syncing power states. # Defaults to $::os_service_default # +# [*sync_power_state_interval*] +# (optional) Interval to sync power states between the database and the hypervisor. Set +# to -1 to disable. Setting this to 0 will run at the default rate. +# Defaults to $::os_service_default +# # [*consecutive_build_service_disable_threshold*] # (optional) Max number of consecutive build failures before the nova-compute # will disable itself. @@ -215,6 +220,7 @@ class nova::compute ( $barbican_api_version = $::os_service_default, $max_concurrent_live_migrations = $::os_service_default, $sync_power_state_pool_size = $::os_service_default, + $sync_power_state_interval = $::os_service_default, $consecutive_build_service_disable_threshold = $::os_service_default, $keymgr_backend = 'nova.keymgr.conf_key_mgr.ConfKeyManager', $verify_glance_signatures = $::os_service_default, @@ -307,6 +313,7 @@ class nova::compute ( 'barbican/barbican_api_version': value => $barbican_api_version; 'DEFAULT/max_concurrent_live_migrations': value => $max_concurrent_live_migrations; 'DEFAULT/sync_power_state_pool_size': value => $sync_power_state_pool_size; + 'DEFAULT/sync_power_state_interval': value => $sync_power_state_interval; 'compute/consecutive_build_service_disable_threshold': value => $consecutive_build_service_disable_threshold; } diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 508c6a176..25af7d775 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -37,6 +37,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('glance/verify_glance_signatures').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/max_concurrent_live_migrations').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_pool_size').with_value('') } + it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_interval').with_value('') } it { is_expected.to contain_nova_config('compute/consecutive_build_service_disable_threshold').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/reserved_huge_pages').with_value('') } @@ -85,6 +86,7 @@ describe 'nova::compute' do :barbican_auth_endpoint => 'http://127.0.0.1:5000/v3', :max_concurrent_live_migrations => '4', :sync_power_state_pool_size => '10', + :sync_power_state_interval => '0', :verify_glance_signatures => true, :consecutive_build_service_disable_threshold => '9', } @@ -144,6 +146,8 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_pool_size').with_value('10') } + it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_interval').with_value('0') } + it { is_expected.to contain_nova_config('compute/consecutive_build_service_disable_threshold').with_value('9') } it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value(true) }