Expose executor_thread_pool_size

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

Change-Id: If4ea3913c5ec9c3719d57b8b682a87816cbaabf7
This commit is contained in:
Takashi Kajinami 2023-03-06 13:40:28 +09:00
parent da45ce8a21
commit ee09225ba9
3 changed files with 31 additions and 16 deletions

View File

@ -24,6 +24,10 @@
# (Optional) Configure the timeout (in seconds) for rpc responses # (Optional) Configure the timeout (in seconds) for rpc responses
# Defaults to $facts['os_service_default']. # 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*] # [*rabbit_ha_queues*]
# (optional) Use HA queues in RabbitMQ (x-ha-policy: all). # (optional) Use HA queues in RabbitMQ (x-ha-policy: all).
# Defaults to $facts['os_service_default']. # Defaults to $facts['os_service_default'].
@ -253,6 +257,7 @@ class heat(
$default_transport_url = $facts['os_service_default'], $default_transport_url = $facts['os_service_default'],
$rpc_response_timeout = $facts['os_service_default'], $rpc_response_timeout = $facts['os_service_default'],
$control_exchange = $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_ha_queues = $facts['os_service_default'],
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
$rabbit_heartbeat_rate = $facts['os_service_default'], $rabbit_heartbeat_rate = $facts['os_service_default'],
@ -404,6 +409,7 @@ class heat(
transport_url => $default_transport_url, transport_url => $default_transport_url,
rpc_response_timeout => $rpc_response_timeout, rpc_response_timeout => $rpc_response_timeout,
control_exchange => $control_exchange, control_exchange => $control_exchange,
executor_thread_pool_size => $executor_thread_pool_size,
} }
oslo::middleware { 'heat_config': oslo::middleware { 'heat_config':

View File

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

View File

@ -41,7 +41,7 @@ describe 'heat' do
it_configures 'with SSL enabled without kombu' it_configures 'with SSL enabled without kombu'
it_configures 'with SSL disabled' it_configures 'with SSL disabled'
it_configures 'with enable_stack_adopt and enable_stack_abandon set' 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' it_configures 'with notification_driver set to a string'
context 'with amqp messaging' do context 'with amqp messaging' do
@ -75,10 +75,13 @@ describe 'heat' do
is_expected.to contain_heat_config('DEFAULT/host').with_value('<SERVICE DEFAULT>') is_expected.to contain_heat_config('DEFAULT/host').with_value('<SERVICE DEFAULT>')
end end
it 'configures default transport_url' do it 'configures default messaging default parameters' do
is_expected.to contain_heat_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>') is_expected.to contain_oslo__messaging__default('heat_config').with(
is_expected.to contain_heat_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>') :transport_url => '<SERVICE DEFAULT>',
is_expected.to contain_heat_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>') :rpc_response_timeout => '<SERVICE DEFAULT>',
:control_exchange => '<SERVICE DEFAULT>',
:executor_thread_pool_size => '<SERVICE DEFAULT>',
)
end end
it 'configures max_template_size' do it 'configures max_template_size' do
@ -323,20 +326,22 @@ describe 'heat' do
end end
end end
shared_examples_for 'with overridden transport_url parameter' do shared_examples_for 'with overridden messaging default parameters' do
before do before do
params.merge!( params.merge!(
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '120', :rpc_response_timeout => 120,
:control_exchange => 'heat', :control_exchange => 'heat',
:executor_thread_pool_size => 64,
) )
end end
it 'configures transport_url' do it 'configures messaging default parameters' do
is_expected.to contain_oslo__messaging__default('heat_config').with( is_expected.to contain_oslo__messaging__default('heat_config').with(
:transport_url => 'rabbit://rabbit_user:password@localhost:5673', :transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '120', :rpc_response_timeout => 120,
:control_exchange => 'heat' :control_exchange => 'heat',
:executor_thread_pool_size => 64,
) )
end end
end end