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: I79022b40efdbc423a4a85f15149b6a05f348fe1b
This commit is contained in:
Takashi Kajinami
2024-09-30 12:00:22 +09:00
parent f1fa5f5537
commit 84b18a1b2c
3 changed files with 20 additions and 1 deletions

View File

@@ -246,6 +246,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'].
#
# [*notification_format*]
# (optional) Format used for OpenStack notifications
# Defaults to facts['os_service_default']
@@ -379,6 +384,7 @@ class nova(
$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_format = $facts['os_service_default'],
$notify_on_state_change = $facts['os_service_default'],
$ovsdb_connection = $facts['os_service_default'],
@@ -575,6 +581,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa, ssh-ed25519.")
transport_url => $notification_transport_url,
driver => $notification_driver,
topics => $notification_topics,
retry => $notification_retry,
}
nova_config {

View File

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

View File

@@ -63,6 +63,7 @@ describe 'nova' do
:transport_url => '<SERVICE DEFAULT>',
:driver => '<SERVICE DEFAULT>',
:topics => '<SERVICE DEFAULT>',
:retry => '<SERVICE DEFAULT>',
)
end
@@ -134,6 +135,7 @@ describe 'nova' do
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'ceilometer.compute.nova_notifier',
:notification_topics => 'openstack',
:notification_retry => 10,
:notification_format => 'unversioned',
:report_interval => '10',
:periodic_fuzzy_delay => '61',
@@ -204,6 +206,7 @@ describe 'nova' do
:transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:driver => 'ceilometer.compute.nova_notifier',
:topics => 'openstack',
:retry => 10,
)
end
@@ -242,7 +245,12 @@ describe 'nova' do
end
context 'with multiple notification_driver' do
before { params.merge!( :notification_driver => ['ceilometer.compute.nova_notifier', 'nova.openstack.common.notifier.rpc_notifier']) }
before do
params.merge!( :notification_driver => [
'ceilometer.compute.nova_notifier',
'nova.openstack.common.notifier.rpc_notifier'
])
end
it { is_expected.to contain_oslo__messaging__notifications('nova_config').with(
:driver => ['ceilometer.compute.nova_notifier', 'nova.openstack.common.notifier.rpc_notifier'],