Merge "Expose parameter to customize [oslo_messaging_notifications] retry"

This commit is contained in:
Zuul 2024-10-01 02:51:54 +00:00 committed by Gerrit Code Review
commit 26494a0411
3 changed files with 16 additions and 2 deletions

View File

@ -133,6 +133,11 @@
# (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'].
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the vitrage config.
@ -172,6 +177,7 @@ class vitrage (
$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'],
Boolean $purge_config = false,
$snapshots_interval = $facts['os_service_default'],
$types = $facts['os_service_default'],
@ -220,6 +226,7 @@ class vitrage (
transport_url => $notification_transport_url,
driver => $notification_driver,
topics => $notification_topics,
retry => $notification_retry,
}
vitrage_config {

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``vitrage::notification_retry`` parameter has been added.

View File

@ -51,7 +51,8 @@ describe 'vitrage' do
is_expected.to contain_oslo__messaging__notifications('vitrage_config').with(
:transport_url => '<SERVICE DEFAULT>',
:driver => '<SERVICE DEFAULT>',
:topics => '<SERVICE DEFAULT>'
:topics => '<SERVICE DEFAULT>',
:retry => '<SERVICE DEFAULT>'
)
end
@ -86,6 +87,7 @@ describe 'vitrage' do
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'messaging',
:notification_topics => 'openstack',
:notification_retry => 10,
:types => 'nova.host,nova.instance,nova.zone,cinder.volume,neutron.port,neutron.network,doctor',
:snapshots_interval => '120',
}
@ -121,7 +123,8 @@ describe 'vitrage' do
is_expected.to contain_oslo__messaging__notifications('vitrage_config').with(
:transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:driver => 'messaging',
:topics => 'openstack'
:topics => 'openstack',
:retry => 10,
)
end