Expose executor_thread_pool_size

This option has been supported by puppet-oslo but has not been
configurable.

Conflicts:
	manifests/init.pp

Change-Id: If4ea3913c5ec9c3719d57b8b682a87816cbaabf7
(cherry picked from commit ee09225ba9)
(cherry picked from commit 23eb2c5071)
This commit is contained in:
Takashi Kajinami 2023-03-06 13:40:28 +09:00
parent 9711a45fbb
commit de3d03502f
3 changed files with 31 additions and 16 deletions

View File

@ -24,6 +24,10 @@
# (Optional) Configure the timeout (in seconds) for rpc responses
# 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.
#
# [*rabbit_ha_queues*]
# (optional) Use HA queues in RabbitMQ (x-ha-policy: all).
# Defaults to $::os_service_default.
@ -258,6 +262,7 @@ class heat(
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
$executor_thread_pool_size = $::os_service_default,
$rabbit_ha_queues = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
$rabbit_heartbeat_rate = $::os_service_default,
@ -408,9 +413,10 @@ Use heat::engine::max_stacks_per_tenant instead.')
}
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':

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``heat::executor_thread_pool_size`` parameter has been added.

View File

@ -42,7 +42,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
@ -76,10 +76,13 @@ describe 'heat' do
is_expected.to contain_heat_config('DEFAULT/host').with_value('<SERVICE DEFAULT>')
end
it 'configures default transport_url' do
is_expected.to contain_heat_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
it 'configures default messaging default parameters' do
is_expected.to contain_oslo__messaging__default('heat_config').with(
:transport_url => '<SERVICE DEFAULT>',
:rpc_response_timeout => '<SERVICE DEFAULT>',
:control_exchange => '<SERVICE DEFAULT>',
:executor_thread_pool_size => '<SERVICE DEFAULT>',
)
end
it 'configures max_template_size' do
@ -324,20 +327,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