From cc53f1f9e3ab00f5f4a76d8dd57dcf7fb2708c29 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Fri, 9 Feb 2018 14:53:18 +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: Id48e371c02e19c0e4ba193a61a2e15e74ffeba8f Closes-Bug: #1748353 --- manifests/init.pp | 8 ++++++++ .../notes/add_rabbit_kombu_options-b43953e81f9516c0.yaml | 6 ++++++ spec/classes/nova_init_spec.rb | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/add_rabbit_kombu_options-b43953e81f9516c0.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 15dd37e66..8f84eeb44 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, diff --git a/releasenotes/notes/add_rabbit_kombu_options-b43953e81f9516c0.yaml b/releasenotes/notes/add_rabbit_kombu_options-b43953e81f9516c0.yaml new file mode 100644 index 000000000..8ade11575 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-b43953e81f9516c0.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/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index fc21405ec..706ea47f0 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -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('') + is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_compression').with_value('') is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') 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('') is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_nova_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_oslo__messaging__rabbit('nova_config').with( :rabbit_use_ssl => '',