Add some kombu options

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: I450966c0fc782671c51b8560c162a172f5f315ba
Closes-Bug: #1748353
(cherry picked from commit 80b2b56169)
This commit is contained in:
ZhongShengping 2018-02-09 14:02:05 +08:00 committed by zhongshengping
parent b11e830ab9
commit 884c976889
3 changed files with 17 additions and 0 deletions

View File

@ -160,6 +160,12 @@
# consumer cancel notification.
# 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.
@ -288,6 +294,7 @@ class barbican::api (
$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,
$auth_strategy = 'keystone',
$manage_service = true,
@ -377,6 +384,7 @@ the future release. Please use barbican::api::package_ensure instead.")
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

@ -56,6 +56,7 @@ describe 'barbican::api' do
:kombu_ssl_keyfile => '<SERVICE DEFAULT>',
:kombu_ssl_version => '<SERVICE DEFAULT>',
:kombu_reconnect_delay => '<SERVICE DEFAULT>',
:kombu_failover_strategy => '<SERVICE DEFAULT>',
:manage_service => true,
:enabled => true,
:enabled_secretstore_plugins => ['<SERVICE DEFAULT>'],
@ -102,6 +103,7 @@ describe 'barbican::api' do
:kombu_ssl_keyfile => 'path_to_keyfile',
:kombu_ssl_version => '1.2',
:kombu_reconnect_delay => '10',
:kombu_failover_strategy => 'shuffle',
:enabled_secretstore_plugins => ['dogtag_crypto', 'store_crypto', 'kmip'],
:enabled_crypto_plugins => ['simple_crypto'],
:enabled_certificate_plugins => ['simple_certificate', 'dogtag'],
@ -183,6 +185,7 @@ describe 'barbican::api' do
it 'configures kombu params' do
is_expected.to contain_barbican_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value(param_hash[:kombu_reconnect_delay])
is_expected.to contain_barbican_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value(param_hash[:kombu_failover_strategy])
end
it 'configures enabled plugins' do