Add support for [oslo_messaging_rabbit] enable_cancel_on_failover

Depends-on: https://review.opendev.org/928440
Change-Id: Ib6a3e185c22f829386822209022e85508185316e
This commit is contained in:
Takashi Kajinami 2024-09-26 11:16:23 +09:00
parent 730a6dbd28
commit a2686b359e
3 changed files with 31 additions and 18 deletions

View File

@ -89,6 +89,11 @@
# (Optional) Limit the number of memory bytes used by the quorum queue.
# 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_use_ssl*]
# (optional) Connect over SSL for RabbitMQ
# Defaults to $facts['os_service_default']
@ -197,6 +202,7 @@ class mistral(
$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'],
$rabbit_enable_cancel_on_failover = $facts['os_service_default'],
$rabbit_use_ssl = $facts['os_service_default'],
$service_down_time = $facts['os_service_default'],
$report_interval = $facts['os_service_default'],
@ -272,6 +278,7 @@ class mistral(
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,
enable_cancel_on_failover => $rabbit_enable_cancel_on_failover,
}
if $sync_db {

View File

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

View File

@ -38,24 +38,25 @@ describe 'mistral' do
:topics => '<SERVICE DEFAULT>'
)
is_expected.to contain_oslo__messaging__rabbit('mistral_config').with(
:rabbit_use_ssl => '<SERVICE DEFAULT>',
:heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
:heartbeat_rate => '<SERVICE DEFAULT>',
:heartbeat_in_pthread => '<SERVICE DEFAULT>',
:rabbit_qos_prefetch_count => '<SERVICE DEFAULT>',
:kombu_reconnect_delay => '<SERVICE DEFAULT>',
:kombu_failover_strategy => '<SERVICE DEFAULT>',
:amqp_durable_queues => '<SERVICE DEFAULT>',
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
:kombu_ssl_certfile => '<SERVICE DEFAULT>',
:kombu_ssl_keyfile => '<SERVICE DEFAULT>',
:kombu_ssl_version => '<SERVICE DEFAULT>',
:rabbit_ha_queues => '<SERVICE DEFAULT>',
:rabbit_quorum_queue => '<SERVICE DEFAULT>',
:rabbit_transient_quorum_queue => '<SERVICE DEFAULT>',
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
:rabbit_use_ssl => '<SERVICE DEFAULT>',
:heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
:heartbeat_rate => '<SERVICE DEFAULT>',
:heartbeat_in_pthread => '<SERVICE DEFAULT>',
:rabbit_qos_prefetch_count => '<SERVICE DEFAULT>',
:kombu_reconnect_delay => '<SERVICE DEFAULT>',
:kombu_failover_strategy => '<SERVICE DEFAULT>',
:amqp_durable_queues => '<SERVICE DEFAULT>',
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
:kombu_ssl_certfile => '<SERVICE DEFAULT>',
:kombu_ssl_keyfile => '<SERVICE DEFAULT>',
:kombu_ssl_version => '<SERVICE DEFAULT>',
:rabbit_ha_queues => '<SERVICE DEFAULT>',
:rabbit_quorum_queue => '<SERVICE DEFAULT>',
:rabbit_transient_quorum_queue => '<SERVICE DEFAULT>',
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
:enable_cancel_on_failover => '<SERVICE DEFAULT>',
)
is_expected.to contain_mistral_config('openstack_actions/os_actions_endpoint_type').with(
:value => '<SERVICE DEFAULT>'