From 46b60d02fac0f2c4742c447fc560a7e59a97a208 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Fri, 9 Feb 2018 14:49:26 +0800 Subject: [PATCH] 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 --- manifests/init.pp | 8 ++++++++ .../notes/add_rabbit_kombu_options-8185738b6f0d8522.yaml | 6 ++++++ spec/classes/mistral_init_spec.rb | 1 + 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add_rabbit_kombu_options-8185738b6f0d8522.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 6b95aee..57fe0a7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -117,6 +117,12 @@ # considered up (integer 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_ssl_ca_certs*] # (optional) SSL certification authority file (valid only if SSL enabled). # Defaults to $::os_service_default @@ -239,6 +245,7 @@ class mistral( $rabbit_use_ssl = $::os_service_default, $service_down_time = $::os_service_default, $report_interval = $::os_service_default, + $kombu_failover_strategy = $::os_service_default, $kombu_ssl_ca_certs = $::os_service_default, $kombu_ssl_certfile = $::os_service_default, $kombu_ssl_keyfile = $::os_service_default, @@ -329,6 +336,7 @@ instead.") rabbit_virtual_host => $rabbit_virtual_host, rabbit_ha_queues => $rabbit_ha_queues, rabbit_use_ssl => $rabbit_use_ssl, + kombu_failover_strategy => $kombu_failover_strategy, kombu_ssl_version => $kombu_ssl_version, kombu_ssl_ca_certs => $kombu_ssl_ca_certs, kombu_ssl_certfile => $kombu_ssl_certfile, diff --git a/releasenotes/notes/add_rabbit_kombu_options-8185738b6f0d8522.yaml b/releasenotes/notes/add_rabbit_kombu_options-8185738b6f0d8522.yaml new file mode 100644 index 0000000..8ade115 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-8185738b6f0d8522.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/mistral_init_spec.rb b/spec/classes/mistral_init_spec.rb index 64fe4ae..a85e53c 100644 --- a/spec/classes/mistral_init_spec.rb +++ b/spec/classes/mistral_init_spec.rb @@ -50,6 +50,7 @@ describe 'mistral' do is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_rate').with_value('') is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '') + is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_failover_strategy').with(:value => '') is_expected.to contain_mistral_config('coordination/backend_url').with(:value => '') is_expected.to contain_mistral_config('coordination/heartbeat_interval').with(:value => '') is_expected.to contain_mistral_config('keystone_authtoken/auth_uri').with(