From 8bbaa1b4559d658f38a55a8032dcdaef7a5445fd Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 30 Sep 2024 12:19:50 +0900 Subject: [PATCH] Expose parameter to customize [oslo_messaging_notifications] retry The parameter has been managed by puppet-oslo, but its value could not be set via this module. Change-Id: I73ac576f7600b3e5e36673f3f591b4d67fdc84ed --- manifests/api.pp | 7 +++++++ .../notes/notification-retry-e92962f26c9b9c89.yaml | 4 ++++ spec/classes/barbican_api_spec.rb | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/notification-retry-e92962f26c9b9c89.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 6b4db6bc..184a409d 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -58,6 +58,11 @@ # (optional) Topics to use for oslo messaging notifications backend. # Defaults to $facts['os_service_default'] # +# [*notification_retry*] +# (optional) The maximum number of attempts to re-sent a notification +# message, which failed to be delivered due to a recoverable error. +# Defaults to $facts['os_service_default']. +# # [*rabbit_use_ssl*] # (optional) Connect over SSL for RabbitMQ # Defaults to $facts['os_service_default'] @@ -260,6 +265,7 @@ class barbican::api ( $notification_transport_url = $facts['os_service_default'], $notification_driver = $facts['os_service_default'], $notification_topics = $facts['os_service_default'], + $notification_retry = $facts['os_service_default'], $rabbit_use_ssl = $facts['os_service_default'], $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $rabbit_heartbeat_rate = $facts['os_service_default'], @@ -354,6 +360,7 @@ class barbican::api ( driver => $notification_driver, transport_url => $notification_transport_url, topics => $notification_topics, + retry => $notification_retry, } # queue options diff --git a/releasenotes/notes/notification-retry-e92962f26c9b9c89.yaml b/releasenotes/notes/notification-retry-e92962f26c9b9c89.yaml new file mode 100644 index 00000000..ecfb87ed --- /dev/null +++ b/releasenotes/notes/notification-retry-e92962f26c9b9c89.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``barbican::api::notification_retry`` parameter has been added. diff --git a/spec/classes/barbican_api_spec.rb b/spec/classes/barbican_api_spec.rb index 33a77580..484a1411 100644 --- a/spec/classes/barbican_api_spec.rb +++ b/spec/classes/barbican_api_spec.rb @@ -31,6 +31,7 @@ describe 'barbican::api' do :notification_transport_url => '', :notification_driver => '', :notification_topics => '', + :notification_retry => '', :rabbit_use_ssl => '', :rabbit_heartbeat_timeout_threshold => '', :rabbit_heartbeat_rate => '', @@ -81,6 +82,7 @@ describe 'barbican::api' do :notification_transport_url => 'rabbit://bugs:bugs_bunny@localhost:1234/rabbithost', :notification_driver => 'kombu', :notification_topics => 'notifications', + :notification_retry => 10, :rabbit_use_ssl => true, :rabbit_heartbeat_timeout_threshold => '10', :rabbit_heartbeat_rate => '10', @@ -167,7 +169,8 @@ describe 'barbican::api' do is_expected.to contain_oslo__messaging__notifications('barbican_config').with( :transport_url => param_hash[:notification_transport_url], :driver => param_hash[:notification_driver], - :topics => param_hash[:notification_topics] + :topics => param_hash[:notification_topics], + :retry => param_hash[:notification_retry], ) is_expected.to contain_oslo__messaging__rabbit('barbican_config').with( :rabbit_use_ssl => param_hash[:rabbit_use_ssl],