Make heat config client_retry_limit configurable

This adds a new parameter to configure client_retry_limit config
to a value higher than the default.

Change-Id: Ibd3999a394c8827efa7a6034e69e55858d2e44ed
This commit is contained in:
Rabi Mishra 2019-12-09 17:05:53 +05:30
parent b4ab38b179
commit 876a4bddfe
3 changed files with 13 additions and 0 deletions

View File

@ -125,6 +125,10 @@
# (Optional) List of directories to search for plug-ins.
# Defaults to $::os_service_default
#
# [*client_retry_limit*]
# (Optional) Number of times to retry when client encounters a transient error.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*heat_watch_server_url*]
@ -155,6 +159,7 @@ class heat::engine (
$template_dir = $::os_service_default,
$max_nested_stack_depth = $::os_service_default,
$plugin_dirs = $::os_service_default,
$client_retry_limit = $::os_service_default,
# DEPRECATED PARAMETERS
$heat_watch_server_url = undef,
) {
@ -233,5 +238,6 @@ class heat::engine (
'DEFAULT/template_dir': value => $template_dir;
'DEFAULT/max_nested_stack_depth': value => $max_nested_stack_depth;
'DEFAULT/plugin_dirs': value => $plugin_dirs_real;
'DEFAULT/client_retry_limit': value => $client_retry_limit;
}
}

View File

@ -0,0 +1,4 @@
---
features:
- Add new parameter 'client_retry_limit' to increase
the number of retries in case of transient errors.

View File

@ -20,6 +20,7 @@ describe 'heat::engine' do
:template_dir => '<SERVICE DEFAULT>',
:max_nested_stack_depth => '<SERVICE DEFAULT>',
:plugin_dirs => '<SERVICE DEFAULT>',
:client_retry_limit => '<SERVICE DEFAULT>',
}
end
@ -49,6 +50,7 @@ describe 'heat::engine' do
:reauthentication_auth_method => 'trusts',
:environment_dir => '/etc/heat/environment.d',
:template_dir => '/etc/heat/templates',
:client_retry_limit => 2,
}
].each do |new_params|
describe 'when #{param_set == {} ? "using default" : "specifying"} parameters'
@ -95,6 +97,7 @@ describe 'heat::engine' do
it { is_expected.to contain_heat_config('DEFAULT/environment_dir').with_value( expected_params[:environment_dir] ) }
it { is_expected.to contain_heat_config('DEFAULT/template_dir').with_value( expected_params[:template_dir] ) }
it { is_expected.to contain_heat_config('DEFAULT/plugin_dirs').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('DEFAULT/client_retry_limit').with_value( expected_params[:client_retry_limit] ) }
end
context 'with disabled service managing' do