Browse Source

Expose executor_thread_pool_size

Adding configuration of the size of executor thread pool.

Change-Id: I36324bae39e05dde57b962948f832c22599c13d2
changes/12/630712/1
Riccardo Pittau 3 years ago
parent
commit
20dffc001f
  1. 18
      manifests/messaging/default.pp
  2. 3
      releasenotes/notes/add_executor_thread_pool_size-1382ff07a6808402.yaml
  3. 9
      spec/defines/oslo_messaging_default_spec.rb

18
manifests/messaging/default.pp

@ -6,6 +6,10 @@
#
# === Parameters:
#
# [*executor_thread_pool_size*]
# (Optional) Size of executor thread pool when executor is threading or eventlet.
# Defaults to $::os_service_default.
#
# [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call. (integer value)
# Defaults to $::os_service_default.
@ -27,15 +31,17 @@
#
define oslo::messaging::default(
$rpc_response_timeout = $::os_service_default,
$transport_url = $::os_service_default,
$control_exchange = $::os_service_default,
$executor_thread_pool_size = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$transport_url = $::os_service_default,
$control_exchange = $::os_service_default,
) {
$default_options = {
'DEFAULT/rpc_response_timeout' => { value => $rpc_response_timeout },
'DEFAULT/transport_url' => { value => $transport_url, secret => true },
'DEFAULT/control_exchange' => { value => $control_exchange },
'DEFAULT/executor_thread_pool_size' => { value => $executor_thread_pool_size },
'DEFAULT/rpc_response_timeout' => { value => $rpc_response_timeout },
'DEFAULT/transport_url' => { value => $transport_url, secret => true },
'DEFAULT/control_exchange' => { value => $control_exchange },
}
create_resources($name, $default_options)

3
releasenotes/notes/add_executor_thread_pool_size-1382ff07a6808402.yaml

@ -0,0 +1,3 @@
---
features:
- Add possibility to configure the size of executor thread pool.

9
spec/defines/oslo_messaging_default_spec.rb

@ -8,6 +8,7 @@ describe 'oslo::messaging::default' do
context 'with default parameters' do
it 'configure DEFAULT default params' do
is_expected.to contain_keystone_config('DEFAULT/executor_thread_pool_size').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
@ -18,13 +19,15 @@ describe 'oslo::messaging::default' do
context 'with overridden parameters' do
let :params do
{
:rpc_response_timeout => '42',
:transport_url => 'proto://url',
:control_exchange => 'openstack',
:executor_thread_pool_size => '64',
:rpc_response_timeout => '42',
:transport_url => 'proto://url',
:control_exchange => 'openstack',
}
end
it 'configure DEFAULT with overridden values' do
is_expected.to contain_keystone_config('DEFAULT/executor_thread_pool_size').with_value('64')
is_expected.to contain_keystone_config('DEFAULT/rpc_response_timeout').with_value('42')
is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value('proto://url').with_secret(true)
is_expected.to contain_keystone_config('DEFAULT/control_exchange').with_value('openstack')

Loading…
Cancel
Save