Add support for [oslo_messaging_rabbit] enable_cancel_on_failover

Depends-on: https://review.opendev.org/928440
Change-Id: I784b70703aef13470d53efcd15c2bbf5089da945
This commit is contained in:
Takashi Kajinami 2024-09-25 21:53:40 +09:00
parent 3f705c3921
commit f1fa5f5537
3 changed files with 129 additions and 114 deletions

View File

@ -93,6 +93,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_retry_interval*]
# (Optional) How frequently to retry connecting with RabbitMQ.
# (integer value)
@ -342,6 +347,7 @@ class nova(
$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_retry_interval = $facts['os_service_default'],
$kombu_ssl_ca_certs = $facts['os_service_default'],
$kombu_ssl_certfile = $facts['os_service_default'],
@ -524,6 +530,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa, ssh-ed25519.")
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,
rabbit_retry_interval => $rabbit_retry_interval,
}

View File

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

View File

@ -56,6 +56,7 @@ describe 'nova' do
: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>',
:rabbit_retry_interval => '<SERVICE DEFAULT>',
)
is_expected.to contain_oslo__messaging__notifications('nova_config').with(
@ -122,6 +123,7 @@ describe 'nova' do
:rabbit_quorum_delivery_limit => 3,
:rabbit_quorum_max_memory_length => 5,
:rabbit_quorum_max_memory_bytes => 1073741824,
:rabbit_enable_cancel_on_failover => false,
:rabbit_retry_interval => '1',
:lock_path => '/var/locky/path',
:state_path => '/var/lib/nova2',
@ -195,6 +197,7 @@ describe 'nova' do
:rabbit_quorum_delivery_limit => 3,
:rabbit_quorum_max_memory_length => 5,
:rabbit_quorum_max_memory_bytes => 1073741824,
:enable_cancel_on_failover => false,
:rabbit_retry_interval => '1',
)
is_expected.to contain_oslo__messaging__notifications('nova_config').with(