Skip to content

Commit

Permalink
compute: add sync_power_state_interval parameter
Browse files Browse the repository at this point in the history
We need this parameter in tripleo:
Ifc817ba77187d454c24090c93461b1edad9fe7c4

And let's also add a release not in the same change via
the change I46568c45956b52b2b6d91c313fee321e2f7f6084
(cherry picked from commit 393694a)

Depends-On: I6333f6127640a9f3f4bebdc10bc467377ae3ed51
Change-Id: Ie82d88f16b42d4405853153460e20f38ba42714a
(cherry picked from commit b4f3d6a)
  • Loading branch information
EmilienM authored and mbaldessari committed Sep 12, 2018
1 parent ce0efbe commit 48013f3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manifests/compute.pp
Expand Up @@ -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.
Expand Down Expand Up @@ -215,6 +220,7 @@
$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,
Expand Down Expand Up @@ -307,6 +313,7 @@
'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;
}
Expand Down
@@ -0,0 +1,7 @@
---
features:
- |
Adding nova::compute::sync_power_state_interval parameter that
configure the interval to sync power states between the database and the
hypervisor. Set to -1 to disable, or to 0 to run the default rate.
Defaults to $::os_service_default.
4 changes: 4 additions & 0 deletions spec/classes/nova_compute_spec.rb
Expand Up @@ -37,6 +37,7 @@
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>') }

Expand Down Expand Up @@ -85,6 +86,7 @@
: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',
}
Expand Down Expand Up @@ -144,6 +146,8 @@

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) }
Expand Down

0 comments on commit 48013f3

Please sign in to comment.