From 1389140f1705bd3fda69bafc8650b47168be780e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 10 Jul 2020 11:17:47 +0900 Subject: [PATCH] Add support for http_retries The new http_retries option was added into neutron to define number of retries in client connections. This patch adds support for that new option. Depends-on: https://review.opendev.org/#/c/736026/ Change-Id: Ifd7978c2404c6dd662d5e228bd7872cdfe00f4f4 --- manifests/server/notifications.pp | 6 ++++++ .../notes/client-http_retries-2bef45e4c83037cf.yaml | 5 +++++ spec/classes/neutron_server_notifications_spec.rb | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/client-http_retries-2bef45e4c83037cf.yaml diff --git a/manifests/server/notifications.pp b/manifests/server/notifications.pp index 2ccd38264..c953605b4 100644 --- a/manifests/server/notifications.pp +++ b/manifests/server/notifications.pp @@ -70,6 +70,10 @@ # the keystone catalog. # Defaults to $::os_service_default # +# [*http_retries*] +# (optional) Number of novaclient/ironicclient retries on failed http calls. +# Defaults to $::os_service_default +# # DEPRECATED PARAMETERS # # [*tenant_id*] @@ -102,6 +106,7 @@ class neutron::server::notifications ( $auth_url = 'http://127.0.0.1:5000', $region_name = $::os_service_default, $endpoint_type = $::os_service_default, + $http_retries = $::os_service_default, # DEPRECATED PARAMETERS $tenant_id = undef, $tenant_name = undef, @@ -153,5 +158,6 @@ Use user_domain_name instead') 'DEFAULT/notify_nova_on_port_status_changes': value => $notify_nova_on_port_status_changes; 'DEFAULT/notify_nova_on_port_data_changes': value => $notify_nova_on_port_data_changes; 'DEFAULT/send_events_interval': value => $send_events_interval; + 'DEFAULT/http_retries': value => $http_retries; } } diff --git a/releasenotes/notes/client-http_retries-2bef45e4c83037cf.yaml b/releasenotes/notes/client-http_retries-2bef45e4c83037cf.yaml new file mode 100644 index 000000000..070524720 --- /dev/null +++ b/releasenotes/notes/client-http_retries-2bef45e4c83037cf.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``neutron::server::notifications::http_retries`` parameter has been + added to set number of client retries. diff --git a/spec/classes/neutron_server_notifications_spec.rb b/spec/classes/neutron_server_notifications_spec.rb index f80158014..50dced62e 100644 --- a/spec/classes/neutron_server_notifications_spec.rb +++ b/spec/classes/neutron_server_notifications_spec.rb @@ -46,6 +46,7 @@ describe 'neutron::server::notifications' do should_not contain_neutron_config('nova/user_domain_id') should contain_neutron_config('nova/user_domain_name').with_value('Default') should contain_neutron_config('nova/endpoint_type').with_value('') + should contain_neutron_config('DEFAULT/http_retries').with_value('') end context 'when overriding parameters' do @@ -62,7 +63,8 @@ describe 'neutron::server::notifications' do :project_domain_name => 'Default_2', :user_domain_id => 'default_3', :user_domain_name => 'Default_4', - :endpoint_type => 'internal' + :endpoint_type => 'internal', + :http_retries => 3, ) end @@ -81,6 +83,7 @@ describe 'neutron::server::notifications' do should contain_neutron_config('nova/user_domain_id').with_value('default_3') should contain_neutron_config('nova/user_domain_name').with_value('Default_4') should contain_neutron_config('nova/endpoint_type').with_value('internal') + should contain_neutron_config('DEFAULT/http_retries').with_value(3) end end