compute: add sync_power_state_interval parameter

We need this parameter in tripleo:
Ifc817ba77187d454c24090c93461b1edad9fe7c4

Depends-On: I6333f6127640a9f3f4bebdc10bc467377ae3ed51
Change-Id: Ie82d88f16b42d4405853153460e20f38ba42714a
This commit is contained in:
Emilien Macchi 2018-09-03 22:42:45 -04:00
parent 1cbdf1dcab
commit b4f3d6a571
2 changed files with 11 additions and 0 deletions

View File

@ -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;
}

View File

@ -37,6 +37,7 @@ describe 'nova::compute' do
it { is_expected.to contain_nova_config('glance/verify_glance_signatures').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/max_concurrent_live_migrations').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_pool_size').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_interval').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('compute/consecutive_build_service_disable_threshold').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/reserved_huge_pages').with_value('<SERVICE DEFAULT>') }
@ -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) }