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: I904e0bb50c12f94a21ad006c3435d94f0104ecf8
Closes-Bug: #1748353
This commit is contained in:
ZhongShengping 2018-02-09 14:49:26 +08:00
parent f0c834bf9a
commit 46b60d02fa
3 changed files with 15 additions and 0 deletions

View File

@ -117,6 +117,12 @@
# considered up (integer value). # considered up (integer value).
# Defaults to $::os_service_default # 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_ssl_ca_certs*] # [*kombu_ssl_ca_certs*]
# (optional) SSL certification authority file (valid only if SSL enabled). # (optional) SSL certification authority file (valid only if SSL enabled).
# Defaults to $::os_service_default # Defaults to $::os_service_default
@ -239,6 +245,7 @@ class mistral(
$rabbit_use_ssl = $::os_service_default, $rabbit_use_ssl = $::os_service_default,
$service_down_time = $::os_service_default, $service_down_time = $::os_service_default,
$report_interval = $::os_service_default, $report_interval = $::os_service_default,
$kombu_failover_strategy = $::os_service_default,
$kombu_ssl_ca_certs = $::os_service_default, $kombu_ssl_ca_certs = $::os_service_default,
$kombu_ssl_certfile = $::os_service_default, $kombu_ssl_certfile = $::os_service_default,
$kombu_ssl_keyfile = $::os_service_default, $kombu_ssl_keyfile = $::os_service_default,
@ -329,6 +336,7 @@ instead.")
rabbit_virtual_host => $rabbit_virtual_host, rabbit_virtual_host => $rabbit_virtual_host,
rabbit_ha_queues => $rabbit_ha_queues, rabbit_ha_queues => $rabbit_ha_queues,
rabbit_use_ssl => $rabbit_use_ssl, rabbit_use_ssl => $rabbit_use_ssl,
kombu_failover_strategy => $kombu_failover_strategy,
kombu_ssl_version => $kombu_ssl_version, kombu_ssl_version => $kombu_ssl_version,
kombu_ssl_ca_certs => $kombu_ssl_ca_certs, kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_ssl_certfile => $kombu_ssl_certfile, kombu_ssl_certfile => $kombu_ssl_certfile,

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

@ -50,6 +50,7 @@ describe 'mistral' do
is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>') is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_failover_strategy').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('coordination/backend_url').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_mistral_config('coordination/backend_url').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('coordination/heartbeat_interval').with(:value => '<SERVICE DEFAULT>') is_expected.to contain_mistral_config('coordination/heartbeat_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('keystone_authtoken/auth_uri').with( is_expected.to contain_mistral_config('keystone_authtoken/auth_uri').with(