Add a rabbit_transient_queues_ttl and amqp_auto_delete params
The amqp_auto_delete option needs this patch: https://review.opendev.org/c/openstack/puppet-oslo/+/944132 Since transient_queues_ttl is also managed by oslo::messaging::rabbit, there's no way to use manila_config to set it, so this patch is mandatory for one to set rabbit_transient_queues_ttl in manila.conf. Co-Authored-By: Thomas Goirand <zigo@debian.org> Change-Id: Iadfcd0859e2912d3f636ab4f550f056890357b90
This commit is contained in:
parent
7dfbb46789
commit
78a9210955
@ -61,6 +61,14 @@
|
||||
# (Optional) Use quorum queues for transients queues in RabbitMQ.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rabbit_transient_queues_ttl*]
|
||||
# (Optional) Positive integer representing duration in seconds for
|
||||
# queue TTL (x-expires). Queues which are unused for the duration
|
||||
# of the TTL are automatically deleted.
|
||||
# The parameter affects only reply and fanout queues. (integer value)
|
||||
# Min to 1
|
||||
# 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
|
||||
@ -112,6 +120,10 @@
|
||||
# (optional) Use durable queues in amqp.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*amqp_auto_delete*]
|
||||
# (Optional) Define if transient queues should be auto-deleted (boolean value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_ssl*]
|
||||
# (optional) Enable SSL on the API server
|
||||
# Defaults to false
|
||||
@ -215,6 +227,7 @@ class manila (
|
||||
$rabbit_ha_queues = $facts['os_service_default'],
|
||||
$rabbit_quorum_queue = $facts['os_service_default'],
|
||||
$rabbit_transient_quorum_queue = $facts['os_service_default'],
|
||||
$rabbit_transient_queues_ttl = $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'],
|
||||
@ -226,6 +239,7 @@ class manila (
|
||||
$kombu_ssl_version = $facts['os_service_default'],
|
||||
$kombu_failover_strategy = $facts['os_service_default'],
|
||||
$amqp_durable_queues = $facts['os_service_default'],
|
||||
$amqp_auto_delete = $facts['os_service_default'],
|
||||
$rabbit_qos_prefetch_count = $facts['os_service_default'],
|
||||
$package_ensure = 'present',
|
||||
Boolean $use_ssl = false,
|
||||
@ -272,6 +286,7 @@ class manila (
|
||||
oslo::messaging::rabbit { 'manila_config':
|
||||
rabbit_use_ssl => $rabbit_use_ssl,
|
||||
amqp_durable_queues => $amqp_durable_queues,
|
||||
amqp_auto_delete => $amqp_auto_delete,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||
@ -284,6 +299,7 @@ class manila (
|
||||
rabbit_qos_prefetch_count => $rabbit_qos_prefetch_count,
|
||||
rabbit_quorum_queue => $rabbit_quorum_queue,
|
||||
rabbit_transient_quorum_queue => $rabbit_transient_quorum_queue,
|
||||
rabbit_transient_queues_ttl => $rabbit_transient_queues_ttl,
|
||||
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,
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add a new ``amqp_auto_delete`` parameter, so that transient queues are
|
||||
automatically deleted.
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
A new parameter ``rabbit_transient_queues_ttl`` has been added to the
|
||||
manila class to configure how long transient queue should stay until
|
||||
they are automatically deleted.
|
@ -36,6 +36,7 @@ describe 'manila' do
|
||||
is_expected.to contain_oslo__messaging__rabbit('manila_config').with(
|
||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||
:amqp_durable_queues => '<SERVICE DEFAULT>',
|
||||
:amqp_auto_delete => '<SERVICE DEFAULT>',
|
||||
:rabbit_ha_queues => '<SERVICE DEFAULT>',
|
||||
:kombu_failover_strategy => '<SERVICE DEFAULT>',
|
||||
:heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
|
||||
@ -44,6 +45,7 @@ describe 'manila' do
|
||||
:rabbit_qos_prefetch_count => '<SERVICE DEFAULT>',
|
||||
:rabbit_quorum_queue => '<SERVICE DEFAULT>',
|
||||
:rabbit_transient_quorum_queue => '<SERVICE DEFAULT>',
|
||||
:rabbit_transient_queues_ttl => '<SERVICE DEFAULT>',
|
||||
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
|
||||
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
|
||||
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
|
||||
@ -138,27 +140,17 @@ describe 'manila' do
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with amqp_durable_queues disabled' do
|
||||
let :params do
|
||||
req_params.merge({
|
||||
:amqp_durable_queues => false,
|
||||
})
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__messaging__rabbit('manila_config').with(
|
||||
:amqp_durable_queues => false,
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with amqp_durable_queues enabled' do
|
||||
context 'with amqp options' do
|
||||
let :params do
|
||||
req_params.merge({
|
||||
:amqp_durable_queues => true,
|
||||
:amqp_auto_delete => false,
|
||||
})
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__messaging__rabbit('manila_config').with(
|
||||
:amqp_durable_queues => true,
|
||||
:amqp_auto_delete => false,
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user