From 6362185f5c93c67fdaedd1ef94a6b776e4adbbc6 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Fri, 9 Feb 2018 14:13:04 +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: I027e9f4da58e290065ae048800d358114b69b63f Closes-Bug: #1748353 --- manifests/init.pp | 8 ++++++++ .../notes/add_rabbit_kombu_options-a282d4e697a30c03.yaml | 6 ++++++ spec/classes/cinder_init_spec.rb | 1 + 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add_rabbit_kombu_options-a282d4e697a30c03.yaml diff --git a/manifests/init.pp b/manifests/init.pp index bf601020..0e640a96 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -82,6 +82,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. @@ -323,6 +329,7 @@ class cinder ( $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, @@ -414,6 +421,7 @@ instead.") heartbeat_rate => $rabbit_heartbeat_rate, rabbit_use_ssl => $rabbit_use_ssl, kombu_reconnect_delay => $kombu_reconnect_delay, + kombu_failover_strategy => $kombu_failover_strategy, kombu_ssl_version => $kombu_ssl_version, kombu_ssl_keyfile => $kombu_ssl_keyfile, kombu_ssl_certfile => $kombu_ssl_certfile, diff --git a/releasenotes/notes/add_rabbit_kombu_options-a282d4e697a30c03.yaml b/releasenotes/notes/add_rabbit_kombu_options-a282d4e697a30c03.yaml new file mode 100644 index 00000000..8ade1157 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-a282d4e697a30c03.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/cinder_init_spec.rb b/spec/classes/cinder_init_spec.rb index bfefb964..09912ceb 100644 --- a/spec/classes/cinder_init_spec.rb +++ b/spec/classes/cinder_init_spec.rb @@ -47,6 +47,7 @@ describe 'cinder' do is_expected.to contain_cinder_config('oslo_messaging_rabbit/heartbeat_rate').with_value('') is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '') is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '') + is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_failover_strategy').with(:value => '') is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_compression').with(:value => '') is_expected.to contain_cinder_config('DEFAULT/storage_availability_zone').with(:value => 'nova') is_expected.to contain_cinder_config('DEFAULT/default_availability_zone').with(:value => 'nova')