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: I62221868fdfbaab1abb865117378b193b4ce8756
This commit is contained in:
Takashi Kajinami 2024-09-29 18:28:51 +09:00
parent e80abd168d
commit 72234d6eb9
3 changed files with 37 additions and 22 deletions

View File

@ -2,14 +2,14 @@
# used to configure rabbitmq notifications for glance
#
# [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $facts['os_service_default']
# (Optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $facts['os_service_default']
#
# [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call.
# Defaults to $facts['os_service_default']
# (Optional) Seconds to wait for a response from a call.
# Defaults to $facts['os_service_default']
#
# [*control_exchange*]
# (Optional) The default exchange under which topics are scoped. May be
@ -21,11 +21,6 @@
# (Optional) Size of executor thread pool when executor is threading or eventlet.
# Defaults to $facts['os_service_default'].
#
# [*notification_transport_url*]
# (optional) Connection url for oslo messaging notification backend. An
# example rabbit url would be, rabbit://user:pass@host:port/virtual_host
# Defaults to $facts['os_service_default']
#
# [*rabbit_ha_queues*]
# (Optional) Use HA queues in RabbitMQ (x-ha-policy: all). If you change this
# option, you must wipe the RabbitMQ database. (boolean value)
@ -119,10 +114,6 @@
# more than one RabbitMQ node is provided in config. (string value)
# Defaults to $facts['os_service_default']
#
# [*rabbit_notification_topic*]
# AMQP topic used for OpenStack notifications. (list value)
# Defaults to $facts['os_service_default']
#
# [*amqp_durable_queues*]
# (optional) Define queues as "durable" to rabbitmq. (boolean value)
# Defaults to $facts['os_service_default']
@ -133,17 +124,30 @@
# (string value)
# Defaults to $facts['os_service_default']
#
# [*notification_driver*]
# The Drivers(s) to handle sending notifications. Possible values are
# messaging, messagingv2, routing, log, test, noop (multi valued)
# [*notification_transport_url*]
# (Optional) Connection url for oslo messaging notification backend. An
# example rabbit url would be, rabbit://user:pass@host:port/virtual_host
# Defaults to $facts['os_service_default']
#
# [*rabbit_notification_topic*]
# (Optional) AMQP topic used for OpenStack notifications. (list value)
# Defaults to $facts['os_service_default']
#
# [*notification_driver*]
# (Optional) The Drivers(s) to handle sending notifications. Possible values
# are messaging, messagingv2, routing, log, test, noop (multi valued)
# 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'].
#
class glance::notify::rabbitmq(
$default_transport_url = $facts['os_service_default'],
$rpc_response_timeout = $facts['os_service_default'],
$control_exchange = $facts['os_service_default'],
$executor_thread_pool_size = $facts['os_service_default'],
$notification_transport_url = $facts['os_service_default'],
$rabbit_ha_queues = $facts['os_service_default'],
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
$rabbit_heartbeat_rate = $facts['os_service_default'],
@ -162,10 +166,12 @@ class glance::notify::rabbitmq(
$kombu_ssl_version = $facts['os_service_default'],
$kombu_reconnect_delay = $facts['os_service_default'],
$kombu_failover_strategy = $facts['os_service_default'],
$rabbit_notification_topic = $facts['os_service_default'],
$amqp_durable_queues = $facts['os_service_default'],
$kombu_compression = $facts['os_service_default'],
$notification_transport_url = $facts['os_service_default'],
$rabbit_notification_topic = $facts['os_service_default'],
$notification_driver = $facts['os_service_default'],
$notification_retry = $facts['os_service_default'],
) {
include glance::deps
@ -204,5 +210,6 @@ class glance::notify::rabbitmq(
driver => $notification_driver,
transport_url => $notification_transport_url,
topics => $rabbit_notification_topic,
retry => $notification_retry,
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``glance::notify::rabbitmq::notification_retry`` parameter has been
added.

View File

@ -37,6 +37,7 @@ describe 'glance::notify::rabbitmq' do
:driver => '<SERVICE DEFAULT>',
:transport_url => '<SERVICE DEFAULT>',
:topics => '<SERVICE DEFAULT>',
:retry => '<SERVICE DEFAULT>',
) }
end
@ -47,7 +48,6 @@ describe 'glance::notify::rabbitmq' do
:rpc_response_timeout => '120',
:control_exchange => 'glance',
:executor_thread_pool_size => 64,
:notification_transport_url => 'rabbit://user:pass@alt_host:1234/virt',
:rabbit_ha_queues => true,
:rabbit_heartbeat_timeout_threshold => '60',
:rabbit_heartbeat_rate => '10',
@ -66,10 +66,12 @@ describe 'glance::notify::rabbitmq' do
:kombu_ssl_version => 'TLSv1',
:kombu_reconnect_delay => '5.0',
:kombu_failover_strategy => 'shuffle',
:rabbit_notification_topic => 'notification',
:amqp_durable_queues => true,
:kombu_compression => 'gzip',
:notification_transport_url => 'rabbit://user:pass@alt_host:1234/virt',
:rabbit_notification_topic => 'notification',
:notification_driver => 'messagingv2',
:notification_retry => 10,
}
end
@ -107,6 +109,7 @@ describe 'glance::notify::rabbitmq' do
:driver => 'messagingv2',
:transport_url => 'rabbit://user:pass@alt_host:1234/virt',
:topics => 'notification',
:retry => 10,
) }
end
end