From 7c8720ede864097e733471ff968ca37ac236b2ce Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Fri, 9 Feb 2018 12:03:09 +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: I8c44d54bdefc22bd30d0bc35486354b09611680a Closes-Bug: #1748353 --- manifests/init.pp | 8 ++++++++ .../notes/add_rabbit_kombu_options-97d7fd85fb17b366.yaml | 6 ++++++ spec/classes/aodh_init_spec.rb | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/add_rabbit_kombu_options-97d7fd85fb17b366.yaml diff --git a/manifests/init.pp b/manifests/init.pp index d05f4cb5..992f25a0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -75,6 +75,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. @@ -279,6 +285,7 @@ class aodh ( $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, @@ -373,6 +380,7 @@ the future release. Please use aodh::package_ensure 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-97d7fd85fb17b366.yaml b/releasenotes/notes/add_rabbit_kombu_options-97d7fd85fb17b366.yaml new file mode 100644 index 00000000..8ade1157 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-97d7fd85fb17b366.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/aodh_init_spec.rb b/spec/classes/aodh_init_spec.rb index 223fc7df..a884c63f 100644 --- a/spec/classes/aodh_init_spec.rb +++ b/spec/classes/aodh_init_spec.rb @@ -113,6 +113,7 @@ describe 'aodh' do is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674') is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_aodh_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_oslo__messaging__rabbit('aodh_config').with( :rabbit_use_ssl => '', @@ -131,6 +132,7 @@ describe 'aodh' do is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673') is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('') is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_aodh_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_oslo__messaging__rabbit('aodh_config').with( :rabbit_use_ssl => '',