conductor: Support tuning of heartbeats
This change adds support for the following parameters so that users can tune heart beats in the ironic-conductor service. - [conductor] heartbeat_interval - [conductor] heartbeat_timeout Conflicts: manifests/conductor.pp spec/classes/ironic_conductor_spec.rb (to xena) Conflicts: manifests/conductor.pp spec/classes/ironic_conductor_spec.rb Depends-on: https://review.opendev.org/850298 Change-Id: Ic4ceaf703b897c7266d802f5394ae065ef2d11a1 (cherry picked from commit05a1a03960
) (cherry picked from commit899e7e8bfc
) (cherry picked from commit1fcfe39536
) (cherry picked from commitd80f2bfd7b
)
This commit is contained in:
parent
16ff3993d3
commit
a3c3ab1607
|
@ -193,6 +193,15 @@
|
|||
# after the next heartbeat.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*heartbeat_interval*]
|
||||
# (optional) Seconds between conductor heart beats.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*heartbeat_timeout*]
|
||||
# (optional) Maximum time (in seconds) since the last check-in of
|
||||
# a conductor.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*max_time_interval*]
|
||||
|
@ -249,6 +258,8 @@ class ironic::conductor (
|
|||
$rescue_kernel = $::os_service_default,
|
||||
$rescue_ramdisk = $::os_service_default,
|
||||
$allow_provisioning_in_maintenance = $::os_service_default,
|
||||
$heartbeat_interval = $::os_service_default,
|
||||
$heartbeat_timeout = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$max_time_interval = undef,
|
||||
$api_url = undef,
|
||||
|
@ -374,6 +385,8 @@ Use inspect_wait_timeout instead')
|
|||
'conductor/rescue_kernel': value => $rescue_kernel;
|
||||
'conductor/rescue_ramdisk': value => $rescue_ramdisk;
|
||||
'conductor/allow_provisioning_in_maintenance': value => $allow_provisioning_in_maintenance;
|
||||
'conductor/heartbeat_interval': value => $heartbeat_interval;
|
||||
'conductor/heartbeat_timeout': value => $heartbeat_timeout;
|
||||
}
|
||||
|
||||
if $cleaning_network_name {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The ``ironic::conductor`` class now supports the following two new
|
||||
parameters.
|
||||
|
||||
- ``heartbeat_interval``
|
||||
- ``heartbeat_timeout``
|
|
@ -83,6 +83,8 @@ describe 'ironic::conductor' do
|
|||
is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/power_failure_recovery_interval').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/conductor_group').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/heartbeat_interval').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/heartbeat_timeout').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
|
@ -116,6 +118,8 @@ describe 'ironic::conductor' do
|
|||
:rescue_kernel => 'http://host/rescue.kernel',
|
||||
:rescue_ramdisk => 'http://host/rescue.ramdisk',
|
||||
:allow_provisioning_in_maintenance => false,
|
||||
:heartbeat_interval => 10,
|
||||
:heartbeat_timeout => 60,
|
||||
)
|
||||
end
|
||||
it 'should replace default parameter with new value' do
|
||||
|
@ -148,6 +152,8 @@ describe 'ironic::conductor' do
|
|||
is_expected.to contain_ironic_config('conductor/rescue_kernel').with_value(p[:rescue_kernel])
|
||||
is_expected.to contain_ironic_config('conductor/rescue_ramdisk').with_value(p[:rescue_ramdisk])
|
||||
is_expected.to contain_ironic_config('conductor/allow_provisioning_in_maintenance').with_value(p[:allow_provisioning_in_maintenance])
|
||||
is_expected.to contain_ironic_config('conductor/heartbeat_interval').with_value(p[:heartbeat_interval])
|
||||
is_expected.to contain_ironic_config('conductor/heartbeat_timeout').with_value(p[:heartbeat_timeout])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue