Add support for [oslo_messaging_rabbit] enable_cancel_on_failover

Depends-on: https://review.opendev.org/928440
Change-Id: Iaaab2ed6a7b4b44642f326863060b7ca5311de24
This commit is contained in:
Takashi Kajinami 2024-10-01 14:40:28 +09:00
parent 26494a0411
commit 35b64e9d49
3 changed files with 14 additions and 0 deletions

View File

@ -54,6 +54,11 @@
# (Optional) Limit the number of memory bytes used by the quorum queue. # (Optional) Limit the number of memory bytes used by the quorum queue.
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# #
# [*rabbit_enable_cancel_on_failover*]
# (Optional) Enable x-cancel-on-ha-failover flag so that rabbitmq server will
# cancel and notify consumers when queue is down.
# Defaults to $facts['os_service_default']
#
# [*rabbit_heartbeat_timeout_threshold*] # [*rabbit_heartbeat_timeout_threshold*]
# (optional) Number of seconds after which the RabbitMQ broker is considered # (optional) Number of seconds after which the RabbitMQ broker is considered
# down if the heartbeat keepalive fails. Any value >0 enables heartbeats. # down if the heartbeat keepalive fails. Any value >0 enables heartbeats.
@ -166,6 +171,7 @@ class vitrage (
$rabbit_quorum_delivery_limit = $facts['os_service_default'], $rabbit_quorum_delivery_limit = $facts['os_service_default'],
$rabbit_quorum_max_memory_length = $facts['os_service_default'], $rabbit_quorum_max_memory_length = $facts['os_service_default'],
$rabbit_quorum_max_memory_bytes = $facts['os_service_default'], $rabbit_quorum_max_memory_bytes = $facts['os_service_default'],
$rabbit_enable_cancel_on_failover = $facts['os_service_default'],
$kombu_ssl_ca_certs = $facts['os_service_default'], $kombu_ssl_ca_certs = $facts['os_service_default'],
$kombu_ssl_certfile = $facts['os_service_default'], $kombu_ssl_certfile = $facts['os_service_default'],
$kombu_ssl_keyfile = $facts['os_service_default'], $kombu_ssl_keyfile = $facts['os_service_default'],
@ -202,6 +208,7 @@ class vitrage (
rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit, rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit,
rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length, rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length,
rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes, rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes,
enable_cancel_on_failover => $rabbit_enable_cancel_on_failover,
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $rabbit_heartbeat_rate, heartbeat_rate => $rabbit_heartbeat_rate,
heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, heartbeat_in_pthread => $rabbit_heartbeat_in_pthread,

View File

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

View File

@ -47,6 +47,7 @@ describe 'vitrage' do
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>', :rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>', :rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>', :rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
:enable_cancel_on_failover => '<SERVICE DEFAULT>',
) )
is_expected.to contain_oslo__messaging__notifications('vitrage_config').with( is_expected.to contain_oslo__messaging__notifications('vitrage_config').with(
:transport_url => '<SERVICE DEFAULT>', :transport_url => '<SERVICE DEFAULT>',
@ -119,6 +120,7 @@ describe 'vitrage' do
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>', :rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>', :rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>', :rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
:enable_cancel_on_failover => '<SERVICE DEFAULT>',
) )
is_expected.to contain_oslo__messaging__notifications('vitrage_config').with( is_expected.to contain_oslo__messaging__notifications('vitrage_config').with(
:transport_url => 'rabbit://rabbit_user:password@localhost:5673', :transport_url => 'rabbit://rabbit_user:password@localhost:5673',