From 663a81983107ea571e785691943ed742f7b0c686 Mon Sep 17 00:00:00 2001 From: Jake Yip Date: Wed, 13 Nov 2019 12:21:37 +1100 Subject: [PATCH] Add executor_thread_pool_size Change I36324bae39e05dde57b962948f832c22599c13d2 added executor_thread_pool_size as a new param to oslo::messaging::default, but that option was not updated in many modules like this one. This means a user cannot set executor_thread_pool_size, as setting it anywhere else will throw a duplicate declaration error. This change update the oslo::messaging::default call accordingly, and adds an option to set it, similar to Change Id4a61c39ef6392a3d656952467c756be9e68de91 Change-Id: I92ff2d3fbf038c84a15eaa0a06283a731ec48809 --- manifests/init.pp | 12 +++++++++--- ...d_executor_thread_pool_size-f39600c510541493.yaml | 3 +++ spec/classes/aodh_init_spec.rb | 3 +++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/add_executor_thread_pool_size-f39600c510541493.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 175adcb9..109cc096 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -13,6 +13,10 @@ # (<= 0 means forever) # Defaults to $::os_service_default # +# [*executor_thread_pool_size*] +# (optional) Size of executor thread pool when executor is threading or eventlet. +# Defaults to $::os_service_default. +# # [*default_transport_url*] # (optional) A URL representing the messaging driver to use and its full # configuration. Transport URLs take the form: @@ -220,6 +224,7 @@ class aodh ( $package_ensure = 'present', $alarm_history_time_to_live = $::os_service_default, + $executor_thread_pool_size = $::os_service_default, $default_transport_url = $::os_service_default, $rpc_response_timeout = $::os_service_default, $control_exchange = $::os_service_default, @@ -315,9 +320,10 @@ class aodh ( } oslo::messaging::default { 'aodh_config': - transport_url => $default_transport_url, - rpc_response_timeout => $rpc_response_timeout, - control_exchange => $control_exchange, + executor_thread_pool_size => $executor_thread_pool_size, + transport_url => $default_transport_url, + rpc_response_timeout => $rpc_response_timeout, + control_exchange => $control_exchange, } oslo::messaging::notifications { 'aodh_config': diff --git a/releasenotes/notes/add_executor_thread_pool_size-f39600c510541493.yaml b/releasenotes/notes/add_executor_thread_pool_size-f39600c510541493.yaml new file mode 100644 index 00000000..8e674b4f --- /dev/null +++ b/releasenotes/notes/add_executor_thread_pool_size-f39600c510541493.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add possibility to configure the size of executor thread pool. diff --git a/spec/classes/aodh_init_spec.rb b/spec/classes/aodh_init_spec.rb index 953382f5..0cbc3cbb 100644 --- a/spec/classes/aodh_init_spec.rb +++ b/spec/classes/aodh_init_spec.rb @@ -21,6 +21,7 @@ describe 'aodh' do end it 'configures rabbit' do + is_expected.to contain_aodh_config('DEFAULT/executor_thread_pool_size').with_value('') is_expected.to contain_aodh_config('DEFAULT/transport_url').with_value('') is_expected.to contain_aodh_config('DEFAULT/rpc_response_timeout').with_value('') is_expected.to contain_aodh_config('DEFAULT/control_exchange').with_value('') @@ -44,6 +45,7 @@ describe 'aodh' do context 'with overridden parameters' do let :params do { + :executor_thread_pool_size => '128', :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :rabbit_ha_queues => 'undef', :rabbit_heartbeat_timeout_threshold => '60', @@ -59,6 +61,7 @@ describe 'aodh' do end it 'configures rabbit' do + is_expected.to contain_aodh_config('DEFAULT/executor_thread_pool_size').with_value('128') is_expected.to contain_aodh_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673') is_expected.to contain_aodh_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60') is_expected.to contain_aodh_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10')