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. # (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_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']
@ -197,6 +202,7 @@ class mistral(
$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'],
$rabbit_use_ssl = $facts['os_service_default'], $rabbit_use_ssl = $facts['os_service_default'],
$service_down_time = $facts['os_service_default'], $service_down_time = $facts['os_service_default'],
$report_interval = $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_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,
} }
if $sync_db { if $sync_db {

View File

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

View File

@ -56,6 +56,7 @@ describe 'mistral' 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_mistral_config('openstack_actions/os_actions_endpoint_type').with( is_expected.to contain_mistral_config('openstack_actions/os_actions_endpoint_type').with(
:value => '<SERVICE DEFAULT>' :value => '<SERVICE DEFAULT>'