Merge "Add support for [glance] num_retries parameter"

This commit is contained in:
Zuul 2020-07-13 06:14:00 +00:00 committed by Gerrit Code Review
commit e75f1b4f6a
3 changed files with 16 additions and 4 deletions

View File

@ -65,6 +65,10 @@
# (optional) Override the endpoint to use to talk to Glance.
# Defaults to $::os_service_default
#
# [*glance_num_retries*]
# (optional) Number of retries in glance operation
# Defaults to $::os_service_default
#
# [*rabbit_use_ssl*]
# (optional) Boolean. Connect over SSL for RabbitMQ. (boolean value)
# Defaults to $::os_service_default
@ -453,6 +457,7 @@ class nova(
$rpc_response_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
$glance_endpoint_override = $::os_service_default,
$glance_num_retries = $::os_service_default,
$rabbit_use_ssl = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
$rabbit_heartbeat_rate = $::os_service_default,
@ -788,6 +793,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
'upgrade_levels/network': value => $upgrade_level_network;
'upgrade_levels/scheduler': value => $upgrade_level_scheduler;
'glance/endpoint_override': value => $glance_endpoint_override;
'glance/num_retries': value => $glance_num_retries;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``nova::glance_num_retries`` parameter has been added to support
``[glance] num_retries`` parameter in nova.

View File

@ -43,6 +43,8 @@ describe 'nova' do
end
it 'configures various things' do
is_expected.to contain_nova_config('glance/endpoint_override').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('glance/num_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/state_path').with_value('/var/lib/nova')
is_expected.to contain_nova_config('oslo_concurrency/lock_path').with_value(platform_params[:lock_path])
is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('60')
@ -74,6 +76,7 @@ describe 'nova' do
let :params do
{
:glance_endpoint_override => 'http://localhost:9292',
:glance_num_retries => 3,
:glance_api_servers => ['http://localhost:9292', 'http://localhost:9293'],
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '30',
@ -124,11 +127,9 @@ describe 'nova' do
})
end
it 'configures glance endpoint_override' do
it 'configures glance parameters' do
is_expected.to contain_nova_config('glance/endpoint_override').with_value('http://localhost:9292')
end
it 'configures glance api servers' do
is_expected.to contain_nova_config('glance/num_retries').with_value(3)
is_expected.to contain_nova_config('glance/api_servers').with_value(['http://localhost:9292', 'http://localhost:9293'])
end