Support more tunable parameters of heat-engine

Change-Id: If314e079f45101439751c18eddbead56d0863fbb
This commit is contained in:
Takashi Kajinami 2022-01-03 19:53:43 +09:00
parent 63b791ef4f
commit e0f9de35cb
3 changed files with 99 additions and 17 deletions

View File

@ -35,11 +35,6 @@
# (optional) URL of the Heat waitcondition server
# Defaults to $::os_service_default.
#
# [*engine_life_check_timeout*]
# (optional) RPC timeout (in seconds) for the engine liveness check that is
# used for stack locking
# Defaults to $::os_service_default.
#
# [*default_software_config_transport*]
# (optional) Template default for how the server should receive the metadata
# required for software configuration. POLL_SERVER_CFN will allow calls to the
@ -88,6 +83,48 @@
# configure the keystone roles.
# Defaults to $::os_service_default.
#
# [*action_retry_limit*]
# (Optional) Number of times to retry to bring a resource to a non-error
# state.
# Defaults to $::os_service_default.
#
# [*client_retry_limit*]
# (Optional) Number of times to retry when a client encounters an expected
# intermittent error.
# Defaults to $::os_service_default.
#
# [*max_server_name_length*]
# (Optional) Maximum length of a server name to be used in nova.
# Defaults to $::os_service_default.
#
# [*max_interface_check_attempts*]
# (Optional) Number of times to check whether an interface has been attached
# or detached.
# Defaults to $::os_service_default.
#
# [*event_purge_batch_size*]
# (Optional) Controls how many events will be pruned whenever a stack's
# events are purged.
# Defaults to $::os_service_default.
#
# [*max_events_per_stack*]
# (Optional) Rough number of maximum events that will be available per stack.
# Defaults to $::os_service_default.
#
# [*stack_action_timeout*]
# (Optional) Timeout in seconds for stack action.
# Defaults to $::os_service_default.
#
# [*error_wait_time*]
# (Optional) The amount of time in seconds after an error has occurred that
# tasks may continue to run before being cancelled.
# Defaults to $::os_service_default.
#
# [*engine_life_check_timeout*]
# (optional) RPC timeout (in seconds) for the engine liveness check that is
# used for stack locking
# Defaults to $::os_service_default.
#
# [*instance_connection_is_secure*]
# (Optional) Instance connection to CFN/CW API via https.
# Defaults to $::os_service_default
@ -129,10 +166,6 @@
# (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
#
# [*server_keystone_endpoint_type*]
# (Optional) If set, is used to control which authentication endpoint is used
# by user-controlled servers to make calls back to Heat.
@ -153,7 +186,6 @@ class heat::engine (
$heat_stack_user_role = $::os_service_default,
$heat_metadata_server_url = $::os_service_default,
$heat_waitcondition_server_url = $::os_service_default,
$engine_life_check_timeout = $::os_service_default,
$default_software_config_transport = $::os_service_default,
$default_deployment_signal_transport = $::os_service_default,
$default_user_data_format = $::os_service_default,
@ -164,13 +196,21 @@ class heat::engine (
$instance_connection_https_validate_certificates = $::os_service_default,
$max_stacks_per_tenant = $::os_service_default,
$max_resources_per_stack = $::os_service_default,
$action_retry_limit = $::os_service_default,
$client_retry_limit = $::os_service_default,
$max_server_name_length = $::os_service_default,
$max_interface_check_attempts = $::os_service_default,
$event_purge_batch_size = $::os_service_default,
$max_events_per_stack = $::os_service_default,
$stack_action_timeout = $::os_service_default,
$error_wait_time = $::os_service_default,
$engine_life_check_timeout = $::os_service_default,
$num_engine_workers = $::os_workers_heat_engine,
$convergence_engine = $::os_service_default,
$environment_dir = $::os_service_default,
$template_dir = $::os_service_default,
$max_nested_stack_depth = $::os_service_default,
$plugin_dirs = $::os_service_default,
$client_retry_limit = $::os_service_default,
$server_keystone_endpoint_type = $::os_service_default,
# DEPRECATED PARAMETERS
$deferred_auth_method = undef,
@ -232,7 +272,6 @@ class heat::engine (
'DEFAULT/heat_stack_user_role': value => $heat_stack_user_role;
'DEFAULT/heat_metadata_server_url': value => $heat_metadata_server_url;
'DEFAULT/heat_waitcondition_server_url': value => $heat_waitcondition_server_url;
'DEFAULT/engine_life_check_timeout': value => $engine_life_check_timeout;
'DEFAULT/default_software_config_transport': value => $default_software_config_transport;
'DEFAULT/default_deployment_signal_transport': value => $default_deployment_signal_transport;
'DEFAULT/default_user_data_format': value => $default_user_data_format;
@ -241,6 +280,15 @@ class heat::engine (
'DEFAULT/trusts_delegated_roles': value => join(any2array($trusts_delegated_roles), ',');
'DEFAULT/max_stacks_per_tenant': value => $max_stacks_per_tenant_real;
'DEFAULT/max_resources_per_stack': value => $max_resources_per_stack;
'DEFAULT/action_retry_limit': value => $action_retry_limit;
'DEFAULT/client_retry_limit': value => $client_retry_limit;
'DEFAULT/max_server_name_length': value => $max_server_name_length;
'DEFAULT/max_interface_check_attempts': value => $max_interface_check_attempts;
'DEFAULT/event_purge_batch_size': value => $event_purge_batch_size;
'DEFAULT/max_events_per_stack': value => $max_events_per_stack;
'DEFAULT/stack_action_timeout': value => $stack_action_timeout;
'DEFAULT/error_wait_time': value => $error_wait_time;
'DEFAULT/engine_life_check_timeout': value => $engine_life_check_timeout;
'DEFAULT/instance_connection_https_validate_certificates': value => $instance_connection_https_validate_certificates;
'DEFAULT/instance_connection_is_secure': value => $instance_connection_is_secure;
'DEFAULT/num_engine_workers': value => $num_engine_workers;
@ -249,7 +297,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;
'DEFAULT/server_keystone_endpoint_type': value => $server_keystone_endpoint_type;
}

View File

@ -0,0 +1,12 @@
---
features:
- |
The following parameters have been added to the ``heat::engine`` class.
- ``action_retry_limit``
- ``max_server_name_length``
- ``max_interface_check_attempts``
- ``event_purge_batch_size``
- ``max_events_per_stack``
- ``stack_action_timeout``
- ``error_wait_time``

View File

@ -8,19 +8,26 @@ describe 'heat::engine' do
:heat_stack_user_role => '<SERVICE DEFAULT>',
:heat_metadata_server_url => 'http://127.0.0.1:8000',
:heat_waitcondition_server_url => 'http://127.0.0.1:8000/v1/waitcondition',
:engine_life_check_timeout => '<SERVICE DEFAULT>',
:default_software_config_transport => '<SERVICE DEFAULT>',
:default_deployment_signal_transport => '<SERVICE DEFAULT>',
:default_user_data_format => '<SERVICE DEFAULT>',
:reauthentication_auth_method => '<SERVICE DEFAULT>',
:allow_trusts_redelegation => '<SERVICE DEFAULT>',
:trusts_delegated_roles => '<SERVICE DEFAULT>',
:action_retry_limit => '<SERVICE DEFAULT>',
:client_retry_limit => '<SERVICE DEFAULT>',
:max_server_name_length => '<SERVICE DEFAULT>',
:max_interface_check_attempts => '<SERVICE DEFAULT>',
:event_purge_batch_size => '<SERVICE DEFAULT>',
:max_events_per_stack => '<SERVICE DEFAULT>',
:stack_action_timeout => '<SERVICE DEFAULT>',
:error_wait_time => '<SERVICE DEFAULT>',
:engine_life_check_timeout => '<SERVICE DEFAULT>',
:convergence_engine => '<SERVICE DEFAULT>',
:environment_dir => '<SERVICE DEFAULT>',
:template_dir => '<SERVICE DEFAULT>',
:max_nested_stack_depth => '<SERVICE DEFAULT>',
:plugin_dirs => '<SERVICE DEFAULT>',
:client_retry_limit => '<SERVICE DEFAULT>',
:server_keystone_endpoint_type => '<SERVICE DEFAULT>',
}
end
@ -40,7 +47,6 @@ describe 'heat::engine' do
:heat_stack_user_role => 'heat_stack_user',
:heat_metadata_server_url => 'http://127.0.0.1:8000',
:heat_waitcondition_server_url => 'http://127.0.0.1:8000/v1/waitcondition',
:engine_life_check_timeout => '2',
:deferred_auth_method => 'trusts',
:default_software_config_transport => 'POLL_SERVER_CFN',
:default_deployment_signal_transport => 'CFN_SIGNAL',
@ -48,6 +54,15 @@ describe 'heat::engine' do
:reauthentication_auth_method => 'trusts',
:allow_trusts_redelegation => false,
:trusts_delegated_roles => ['role1', 'role2'],
:action_retry_limit => 5,
:client_retry_limit => 2,
:max_server_name_length => 53,
:max_interface_check_attempts => 10,
:event_purge_batch_size => 200,
:max_events_per_stack => 1000,
:stack_action_timeout => 3600,
:error_wait_time => 240,
:engine_life_check_timeout => 2,
:num_engine_workers => '4',
:convergence_engine => false,
:environment_dir => '/etc/heat/environment.d',
@ -85,7 +100,6 @@ describe 'heat::engine' do
it { is_expected.to contain_heat_config('DEFAULT/heat_stack_user_role').with_value( expected_params[:heat_stack_user_role] ) }
it { is_expected.to contain_heat_config('DEFAULT/heat_metadata_server_url').with_value( expected_params[:heat_metadata_server_url] ) }
it { is_expected.to contain_heat_config('DEFAULT/heat_waitcondition_server_url').with_value( expected_params[:heat_waitcondition_server_url] ) }
it { is_expected.to contain_heat_config('DEFAULT/engine_life_check_timeout').with_value( expected_params[:engine_life_check_timeout] ) }
it { is_expected.to contain_heat_config('DEFAULT/deferred_auth_method').with_value( expected_params[:deferred_auth_method] ) }
it { is_expected.to contain_heat_config('DEFAULT/default_software_config_transport').with_value( expected_params[:default_software_config_transport] ) }
it { is_expected.to contain_heat_config('DEFAULT/default_deployment_signal_transport').with_value( expected_params[:default_deployment_signal_transport] ) }
@ -97,6 +111,15 @@ describe 'heat::engine' do
it { is_expected.to contain_heat_config('DEFAULT/instance_connection_https_validate_certificates').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('DEFAULT/max_stacks_per_tenant').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('DEFAULT/max_resources_per_stack').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_heat_config('DEFAULT/action_retry_limit').with_value( expected_params[:action_retry_limit] ) }
it { is_expected.to contain_heat_config('DEFAULT/client_retry_limit').with_value( expected_params[:client_retry_limit] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_server_name_length').with_value( expected_params[:max_server_name_length] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_interface_check_attempts').with_value( expected_params[:max_interface_check_attempts] ) }
it { is_expected.to contain_heat_config('DEFAULT/event_purge_batch_size').with_value( expected_params[:event_purge_batch_size] ) }
it { is_expected.to contain_heat_config('DEFAULT/max_events_per_stack').with_value( expected_params[:max_events_per_stack] ) }
it { is_expected.to contain_heat_config('DEFAULT/stack_action_timeout').with_value( expected_params[:stack_action_timeout] ) }
it { is_expected.to contain_heat_config('DEFAULT/error_wait_time').with_value( expected_params[:error_wait_time] ) }
it { is_expected.to contain_heat_config('DEFAULT/engine_life_check_timeout').with_value( expected_params[:engine_life_check_timeout] ) }
it { is_expected.to contain_heat_config('DEFAULT/num_engine_workers').with_value( expected_params[:num_engine_workers] ) }
it { is_expected.to contain_heat_config('DEFAULT/convergence_engine').with_value( expected_params[:convergence_engine] ) }
it { is_expected.to contain_heat_config('DEFAULT/environment_dir').with_value( expected_params[:environment_dir] ) }