Merge "Add support for the long_rpc_timeout parameter"

This commit is contained in:
Zuul 2021-04-25 17:31:34 +00:00 committed by Gerrit Code Review
commit 78cc909266
3 changed files with 17 additions and 0 deletions

View File

@ -19,6 +19,11 @@
# (Optional) Seconds to wait for a response from a call. (integer value)
# Defaults to $::os_service_default.
#
# [*long_rpc_timeout*]
# (Optional) An alternative timeout value for RPC calls that have
# the potential to take a long time.
# Defaults to $::os_service_default.
#
# [*control_exchange*]
# (Optional) The default exchange under which topics are scoped. May be
# overridden by an exchange name specified in the transport_url
@ -431,6 +436,7 @@ class nova(
$ensure_package = 'present',
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$long_rpc_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
$rabbit_use_ssl = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
@ -788,6 +794,10 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
control_exchange => $control_exchange,
}
nova_config {
'DEFAULT/long_rpc_timeout': value => $long_rpc_timeout;
}
oslo::messaging::notifications { 'nova_config':
transport_url => $notification_transport_url,
driver => $notification_driver,

View File

@ -0,0 +1,4 @@
---
features:
- |
Now the ``nova`` class supports the ``long_rpc_timeout`` parameter.

View File

@ -52,6 +52,7 @@ describe 'nova' do
is_expected.to contain_nova_config('DEFAULT/ovsdb_connection').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('cinder/cross_az_attach').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
@ -75,6 +76,7 @@ describe 'nova' do
:glance_num_retries => 3,
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '30',
:long_rpc_timeout => '1800',
:control_exchange => 'nova',
:rabbit_heartbeat_timeout_threshold => '60',
:rabbit_heartbeat_rate => '10',
@ -137,6 +139,7 @@ describe 'nova' do
it 'configures rabbit' do
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('30')
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('1800')
is_expected.to contain_nova_config('DEFAULT/control_exchange').with_value('nova')
is_expected.to contain_nova_config('cinder/cross_az_attach').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60')