Expose power sync parameters

A busy environment is likely to tune these parameters, let's expose them.

Conflicts:
	manifests/conductor.pp

Change-Id: Ide6de7f7a147e15b2941706f282455baa9d8f671
(cherry picked from commit 5310a06d46)
This commit is contained in:
Dmitry Tantsur 2018-07-03 16:48:36 +02:00
parent 8285d85bbf
commit 4de9ee3f54
3 changed files with 26 additions and 1 deletions

View File

@ -140,6 +140,16 @@
# so that the baremetal node is in the desired new power state.
# Defaults to $::os_service_default
#
# [*sync_power_state_interval*]
# (optional) Interval between syncing the node power state to the database,
# in seconds.
# Defaults to $::os_service_default
#
# [*power_state_sync_max_retries*]
# (optional) The number of times Ironic should try syncing the hardware node
# power state with the node power state in the database.
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*cleaning_network_uuid*]
@ -190,6 +200,8 @@ class ironic::conductor (
$provisioning_network_name = undef,
$rescuing_network_name = undef,
$power_state_change_timeout = $::os_service_default,
$sync_power_state_interval = $::os_service_default,
$power_state_sync_max_retries = $::os_service_default,
# DEPRECATED
$cleaning_network_uuid = undef,
$provisioning_network_uuid = undef,
@ -293,6 +305,8 @@ moved to ironic::glance manifest")
'deploy/default_boot_option': value => $default_boot_option;
'neutron/port_setup_delay': value => $port_setup_delay;
'conductor/power_state_change_timeout': value => $power_state_change_timeout;
'conductor/sync_power_state_interval': value => $sync_power_state_interval;
'conductor/power_state_sync_max_retries': value => $power_state_sync_max_retries;
}
if $cleaning_network_name {

View File

@ -0,0 +1,5 @@
---
features:
- |
Expose the ``sync_power_state_interval`` and
``power_state_sync_max_retries`` parametes in ``ironic::conductor``.

View File

@ -81,6 +81,8 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('deploy/default_boot_option').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('neutron/port_setup_delay').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/power_state_change_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/sync_power_state_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with(:value => '<SERVICE DEFAULT>')
end
context 'when overriding parameters' do
@ -102,7 +104,9 @@ describe 'ironic::conductor' do
:configdrive_swift_container => 'cont',
:default_boot_option => 'local',
:port_setup_delay => '15',
:power_state_change_timeout => '300'
:power_state_change_timeout => '300',
:sync_power_state_interval => 120,
:power_state_sync_max_retries => 5,
)
end
it 'should replace default parameter with new value' do
@ -124,6 +128,8 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('deploy/default_boot_option').with_value(p[:default_boot_option])
is_expected.to contain_ironic_config('neutron/port_setup_delay').with_value(p[:port_setup_delay])
is_expected.to contain_ironic_config('conductor/power_state_change_timeout').with_value(p[:power_state_change_timeout])
is_expected.to contain_ironic_config('conductor/sync_power_state_interval').with_value(p[:sync_power_state_interval])
is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with_value(p[:power_state_sync_max_retries])
end
end