From 5dcc3272dfa93567635e6f2af93bed689988fb1e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 30 Sep 2024 12:17: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: I1351ec585bb22e18cb5bfa1db9c688d02d1c72ec --- manifests/init.pp | 11 +++++++++-- .../notes/notification-retry-d0d08bbcf09121de.yaml | 4 ++++ spec/classes/ironic_init_spec.rb | 5 ++++- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/notification-retry-d0d08bbcf09121de.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 1fbd7a0c..243c593c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -193,7 +193,7 @@ # Defaults to false. # # [*notification_transport_url*] -# (optional) A URL representing the messaging driver to use for notifications +# (Optional) A URL representing the messaging driver to use for notifications # and its full configuration. Transport URLs take the form: # transport://user:pass@host1:port[,hostN:portN]/virtual_host # Defaults to $facts['os_service_default'] @@ -204,9 +204,14 @@ # Defaults to $facts['os_service_default'] # # [*notification_topics*] -# (optional) AMQP topic used for OpenStack notifications +# (Optional) AMQP topic used for OpenStack notifications # 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']. +# # [*notification_level*] # (optional) Notification level for outgoing notifications # Defaults to $facts['os_service_default'] @@ -264,6 +269,7 @@ class ironic ( $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'], $notification_level = $facts['os_service_default'], $versioned_notifications_topics = $facts['os_service_default'], $rbac_service_role_elevated_access = $facts['os_service_default'], @@ -348,5 +354,6 @@ class ironic ( transport_url => $notification_transport_url, driver => $notification_driver, topics => $notification_topics, + retry => $notification_retry, } } diff --git a/releasenotes/notes/notification-retry-d0d08bbcf09121de.yaml b/releasenotes/notes/notification-retry-d0d08bbcf09121de.yaml new file mode 100644 index 00000000..7e91cd04 --- /dev/null +++ b/releasenotes/notes/notification-retry-d0d08bbcf09121de.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``ironic::notification_retry`` parameter has been added. diff --git a/spec/classes/ironic_init_spec.rb b/spec/classes/ironic_init_spec.rb index 08f82079..56f416dc 100644 --- a/spec/classes/ironic_init_spec.rb +++ b/spec/classes/ironic_init_spec.rb @@ -103,7 +103,8 @@ describe 'ironic' do is_expected.to contain_oslo__messaging__notifications('ironic_config').with( :transport_url => '', :driver => '', - :topics => '' + :topics => '', + :retry => '', ) end end @@ -143,6 +144,7 @@ describe 'ironic' do :notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :notification_driver => 'messagingv2', :notification_topics => 'openstack', + :notification_retry => 10, :rbac_service_role_elevated_access => true, :rbac_service_project_name => 'service', } @@ -190,6 +192,7 @@ describe 'ironic' do :transport_url => 'rabbit://rabbit_user:password@localhost:5673', :driver => 'messagingv2', :topics => 'openstack', + :retry => 10, ) end end