From ee09225ba9ea1d68f79dbadd850a878c671c685b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 6 Mar 2023 13:40:28 +0900 Subject: [PATCH] Expose executor_thread_pool_size This option has been supported by puppet-oslo but has not been configurable. Change-Id: If4ea3913c5ec9c3719d57b8b682a87816cbaabf7 --- manifests/init.pp | 12 +++++-- ...tor_thread_pool_size-97e638d8731b2d30.yaml | 4 +++ spec/classes/heat_init_spec.rb | 31 +++++++++++-------- 3 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 releasenotes/notes/executor_thread_pool_size-97e638d8731b2d30.yaml diff --git a/manifests/init.pp b/manifests/init.pp index aa5a5ee4..c747e6e2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,6 +24,10 @@ # (Optional) Configure the timeout (in seconds) for rpc responses # Defaults to $facts['os_service_default']. # +# [*executor_thread_pool_size*] +# (Optional) Size of executor thread pool when executor is threading or eventlet. +# Defaults to $facts['os_service_default']. +# # [*rabbit_ha_queues*] # (optional) Use HA queues in RabbitMQ (x-ha-policy: all). # Defaults to $facts['os_service_default']. @@ -253,6 +257,7 @@ class heat( $default_transport_url = $facts['os_service_default'], $rpc_response_timeout = $facts['os_service_default'], $control_exchange = $facts['os_service_default'], + $executor_thread_pool_size = $facts['os_service_default'], $rabbit_ha_queues = $facts['os_service_default'], $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $rabbit_heartbeat_rate = $facts['os_service_default'], @@ -401,9 +406,10 @@ class heat( } oslo::messaging::default { 'heat_config': - transport_url => $default_transport_url, - rpc_response_timeout => $rpc_response_timeout, - control_exchange => $control_exchange, + transport_url => $default_transport_url, + rpc_response_timeout => $rpc_response_timeout, + control_exchange => $control_exchange, + executor_thread_pool_size => $executor_thread_pool_size, } oslo::middleware { 'heat_config': diff --git a/releasenotes/notes/executor_thread_pool_size-97e638d8731b2d30.yaml b/releasenotes/notes/executor_thread_pool_size-97e638d8731b2d30.yaml new file mode 100644 index 00000000..ffde04b6 --- /dev/null +++ b/releasenotes/notes/executor_thread_pool_size-97e638d8731b2d30.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``heat::executor_thread_pool_size`` parameter has been added. diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index c6c0ada2..05da1d1c 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -41,7 +41,7 @@ describe 'heat' do it_configures 'with SSL enabled without kombu' it_configures 'with SSL disabled' it_configures 'with enable_stack_adopt and enable_stack_abandon set' - it_configures 'with overridden transport_url parameter' + it_configures 'with overridden messaging default parameters' it_configures 'with notification_driver set to a string' context 'with amqp messaging' do @@ -75,10 +75,13 @@ describe 'heat' do is_expected.to contain_heat_config('DEFAULT/host').with_value('') end - it 'configures default transport_url' do - is_expected.to contain_heat_config('DEFAULT/transport_url').with_value('') - is_expected.to contain_heat_config('DEFAULT/rpc_response_timeout').with_value('') - is_expected.to contain_heat_config('DEFAULT/control_exchange').with_value('') + it 'configures default messaging default parameters' do + is_expected.to contain_oslo__messaging__default('heat_config').with( + :transport_url => '', + :rpc_response_timeout => '', + :control_exchange => '', + :executor_thread_pool_size => '', + ) end it 'configures max_template_size' do @@ -323,20 +326,22 @@ describe 'heat' do end end - shared_examples_for 'with overridden transport_url parameter' do + shared_examples_for 'with overridden messaging default parameters' do before do params.merge!( - :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', - :rpc_response_timeout => '120', - :control_exchange => 'heat', + :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', + :rpc_response_timeout => 120, + :control_exchange => 'heat', + :executor_thread_pool_size => 64, ) end - it 'configures transport_url' do + it 'configures messaging default parameters' do is_expected.to contain_oslo__messaging__default('heat_config').with( - :transport_url => 'rabbit://rabbit_user:password@localhost:5673', - :rpc_response_timeout => '120', - :control_exchange => 'heat' + :transport_url => 'rabbit://rabbit_user:password@localhost:5673', + :rpc_response_timeout => 120, + :control_exchange => 'heat', + :executor_thread_pool_size => 64, ) end end