Add kombu_failover_strategy option

Adds the kombu_failover_strategy option for configuring
oslo.messaging.rabbit. This will determines how the next RabbitMQ node
is chosen in case the one we are currently connected to becomes
unavailable.

Change-Id: Id48e371c02e19c0e4ba193a61a2e15e74ffeba8f
Closes-Bug: #1748353
(cherry picked from commit cc53f1f9e3)
This commit is contained in:
ZhongShengping 2018-02-09 14:53:18 +08:00 committed by zhongshengping
parent 64f46ea350
commit cb2881dfa0
3 changed files with 16 additions and 0 deletions

View File

@ -128,6 +128,12 @@
# consumer cancel notification. (floating point value)
# Defaults to $::os_service_default
#
# [*kombu_failover_strategy*]
# (Optional) Determines how the next RabbitMQ node is chosen in case the one
# we are currently connected to becomes unavailable. Takes effect only if
# more than one RabbitMQ node is provided in config. (string value)
# Defaults to $::os_service_default
#
# [*kombu_compression*]
# (optional) Possible values are: gzip, bz2. If not set compression will not
# be used. This option may notbe available in future versions. EXPERIMENTAL.
@ -477,6 +483,7 @@ class nova(
$kombu_ssl_keyfile = $::os_service_default,
$kombu_ssl_version = $::os_service_default,
$kombu_reconnect_delay = $::os_service_default,
$kombu_failover_strategy = $::os_service_default,
$kombu_compression = $::os_service_default,
$amqp_durable_queues = $::os_service_default,
$amqp_server_request_prefix = $::os_service_default,
@ -679,6 +686,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $rabbit_heartbeat_rate,
kombu_reconnect_delay => $kombu_reconnect_delay,
kombu_failover_strategy => $kombu_failover_strategy,
amqp_durable_queues => $amqp_durable_queues,
kombu_compression => $kombu_compression,
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds the kombu_failover_strategy option for configuring oslo.messaging.rabbit.
This will determines how the next RabbitMQ node is chosen in case the one we
are currently connected to becomes unavailable.

View File

@ -233,6 +233,7 @@ describe 'nova' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__messaging__rabbit('nova_config').with(
@ -252,6 +253,7 @@ describe 'nova' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__messaging__rabbit('nova_config').with(
:rabbit_use_ssl => '<SERVICE DEFAULT>',