diff --git a/manifests/init.pp b/manifests/init.pp index ea55381e..2ef2e6f3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -25,6 +25,10 @@ # (Optional) ensure state for package. # Defaults to 'present'. # +# [*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: @@ -221,6 +225,7 @@ class ceilometer( $notification_topics = ['notifications'], $notification_driver = $::os_service_default, $package_ensure = 'present', + $executor_thread_pool_size = $::os_service_default, $default_transport_url = $::os_service_default, $rpc_response_timeout = $::os_service_default, $control_exchange = $::os_service_default, @@ -345,9 +350,10 @@ class ceilometer( } oslo::messaging::default { 'ceilometer_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::cache { 'ceilometer_config': diff --git a/releasenotes/notes/add_executor_thread_pool_size-6f4ffd7ffd0f117a.yaml b/releasenotes/notes/add_executor_thread_pool_size-6f4ffd7ffd0f117a.yaml new file mode 100644 index 00000000..8e674b4f --- /dev/null +++ b/releasenotes/notes/add_executor_thread_pool_size-6f4ffd7ffd0f117a.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add possibility to configure the size of executor thread pool. diff --git a/spec/classes/ceilometer_init_spec.rb b/spec/classes/ceilometer_init_spec.rb index 8d532acc..1600b5e7 100644 --- a/spec/classes/ceilometer_init_spec.rb +++ b/spec/classes/ceilometer_init_spec.rb @@ -105,6 +105,7 @@ describe 'ceilometer' do end it 'configures default transport_url' do + is_expected.to contain_ceilometer_config('DEFAULT/executor_thread_pool_size').with_value('') is_expected.to contain_ceilometer_config('DEFAULT/transport_url').with_value('') is_expected.to contain_ceilometer_config('DEFAULT/rpc_response_timeout').with_value('') is_expected.to contain_ceilometer_config('DEFAULT/control_exchange').with_value('') @@ -133,13 +134,15 @@ describe 'ceilometer' do context 'with overridden transport_url parameter' do before { params.merge!( - :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', - :rpc_response_timeout => '120', - :control_exchange => 'ceilometer', + :executor_thread_pool_size => '128', + :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', + :rpc_response_timeout => '120', + :control_exchange => 'ceilometer', ) } it 'configures transport_url' do + is_expected.to contain_ceilometer_config('DEFAULT/executor_thread_pool_size').with_value('128') is_expected.to contain_ceilometer_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673') is_expected.to contain_ceilometer_config('DEFAULT/rpc_response_timeout').with_value('120') is_expected.to contain_ceilometer_config('DEFAULT/control_exchange').with_value('ceilometer')