From 12815da5bd3cec1e950312acb8de8e2f6582f5bf Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Fri, 9 Feb 2018 14:17:17 +0800 Subject: [PATCH] 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: I6362858759b3af0e350ac52ffe4f89bba59526fb Closes-Bug: #1748353 --- manifests/init.pp | 8 ++++++++ .../notes/add_rabbit_kombu_options-93fa34586e34eb65.yaml | 6 ++++++ spec/classes/congress_init_spec.rb | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/add_rabbit_kombu_options-93fa34586e34eb65.yaml diff --git a/manifests/init.pp b/manifests/init.pp index f2247cc..24cc608 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -80,6 +80,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. @@ -225,6 +231,7 @@ class congress( $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, @@ -293,6 +300,7 @@ congress::rpc_backend are deprecated. Please use congress::default_transport_url 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, diff --git a/releasenotes/notes/add_rabbit_kombu_options-93fa34586e34eb65.yaml b/releasenotes/notes/add_rabbit_kombu_options-93fa34586e34eb65.yaml new file mode 100644 index 0000000..8ade115 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-93fa34586e34eb65.yaml @@ -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. diff --git a/spec/classes/congress_init_spec.rb b/spec/classes/congress_init_spec.rb index c58e563..51e8140 100644 --- a/spec/classes/congress_init_spec.rb +++ b/spec/classes/congress_init_spec.rb @@ -82,6 +82,7 @@ describe 'congress' do is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674') is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_congress_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_oslo__messaging__rabbit('congress_config').with( :rabbit_use_ssl => '', @@ -102,6 +103,7 @@ describe 'congress' do is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673') is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('') is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_congress_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_oslo__messaging__rabbit('congress_config').with( :rabbit_use_ssl => '',