RabbitMQ: Add support for quorum queue options

Depends-on: https://review.opendev.org/894866
Change-Id: Ia52ed95999a66efdf3eaa0f645d93595392426ac
This commit is contained in:
Takashi Kajinami
2023-09-15 11:25:30 +09:00
parent fa8bad5cf2
commit 7a84c30fd1
3 changed files with 60 additions and 26 deletions

View File

@@ -88,6 +88,24 @@
# will be run through a green thread. # will be run through a green thread.
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# #
# [*rabbit_quorum_queue*]
# (Optional) Use quorum queues in RabbitMQ.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_delivery_limit*]
# (Optional) Each time a message is rdelivered to a consumer, a counter is
# incremented. Once the redelivery count exceeds the delivery limit
# the message gets dropped or dead-lettered.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_max_memory_length*]
# (Optional) Limit the number of messages in the quorum queue.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_max_memory_bytes*]
# (Optional) Limit the number of memory bytes used by the quorum queue.
# Defaults to $facts['os_service_default']
#
# [*rabbit_use_ssl*] # [*rabbit_use_ssl*]
# (Optional) Connect over SSL for RabbitMQ # (Optional) Connect over SSL for RabbitMQ
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
@@ -351,6 +369,10 @@ class keystone(
$rabbit_use_ssl = $facts['os_service_default'], $rabbit_use_ssl = $facts['os_service_default'],
$default_transport_url = $facts['os_service_default'], $default_transport_url = $facts['os_service_default'],
$rabbit_ha_queues = $facts['os_service_default'], $rabbit_ha_queues = $facts['os_service_default'],
$rabbit_quorum_queue = $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_bytes = $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'],
@@ -482,19 +504,23 @@ class keystone(
} }
oslo::messaging::rabbit { 'keystone_config': oslo::messaging::rabbit { 'keystone_config':
kombu_ssl_version => $kombu_ssl_version, kombu_ssl_version => $kombu_ssl_version,
kombu_ssl_keyfile => $kombu_ssl_keyfile, kombu_ssl_keyfile => $kombu_ssl_keyfile,
kombu_ssl_certfile => $kombu_ssl_certfile, kombu_ssl_certfile => $kombu_ssl_certfile,
kombu_ssl_ca_certs => $kombu_ssl_ca_certs, kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_reconnect_delay => $kombu_reconnect_delay, kombu_reconnect_delay => $kombu_reconnect_delay,
kombu_failover_strategy => $kombu_failover_strategy, kombu_failover_strategy => $kombu_failover_strategy,
kombu_compression => $kombu_compression, kombu_compression => $kombu_compression,
rabbit_use_ssl => $rabbit_use_ssl, rabbit_use_ssl => $rabbit_use_ssl,
rabbit_ha_queues => $rabbit_ha_queues, rabbit_ha_queues => $rabbit_ha_queues,
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,
amqp_durable_queues => $amqp_durable_queues, amqp_durable_queues => $amqp_durable_queues,
rabbit_quorum_queue => $rabbit_quorum_queue,
rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit,
rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length,
rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes,
} }
if $manage_service { if $manage_service {

View File

@@ -0,0 +1,4 @@
---
features:
- |
The ``keystone`` class now supports options for quorum queues in RabbitMQ.

View File

@@ -65,19 +65,23 @@ describe 'keystone' do
) )
is_expected.to contain_oslo__messaging__rabbit('keystone_config').with( is_expected.to contain_oslo__messaging__rabbit('keystone_config').with(
:kombu_ssl_version => '<SERVICE DEFAULT>', :kombu_ssl_version => '<SERVICE DEFAULT>',
:kombu_ssl_keyfile => '<SERVICE DEFAULT>', :kombu_ssl_keyfile => '<SERVICE DEFAULT>',
:kombu_ssl_certfile => '<SERVICE DEFAULT>', :kombu_ssl_certfile => '<SERVICE DEFAULT>',
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>', :kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
:kombu_reconnect_delay => '<SERVICE DEFAULT>', :kombu_reconnect_delay => '<SERVICE DEFAULT>',
:kombu_failover_strategy => '<SERVICE DEFAULT>', :kombu_failover_strategy => '<SERVICE DEFAULT>',
:kombu_compression => '<SERVICE DEFAULT>', :kombu_compression => '<SERVICE DEFAULT>',
:rabbit_use_ssl => '<SERVICE DEFAULT>', :rabbit_use_ssl => '<SERVICE DEFAULT>',
:rabbit_ha_queues => '<SERVICE DEFAULT>', :rabbit_ha_queues => '<SERVICE DEFAULT>',
:heartbeat_timeout_threshold => '<SERVICE DEFAULT>', :heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
:heartbeat_rate => '<SERVICE DEFAULT>', :heartbeat_rate => '<SERVICE DEFAULT>',
:heartbeat_in_pthread => '<SERVICE DEFAULT>', :heartbeat_in_pthread => '<SERVICE DEFAULT>',
:amqp_durable_queues => '<SERVICE DEFAULT>', :amqp_durable_queues => '<SERVICE DEFAULT>',
:rabbit_quorum_queue => '<SERVICE DEFAULT>',
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
) )
is_expected.to contain_keystone_config('identity/domain_specific_drivers_enabled').with_ensure('absent') is_expected.to contain_keystone_config('identity/domain_specific_drivers_enabled').with_ensure('absent')