diff --git a/manifests/init.pp b/manifests/init.pp index c985e8a8..3b1cd1d8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -70,6 +70,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. @@ -195,6 +201,7 @@ class octavia ( $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, @@ -254,6 +261,7 @@ the future release. Please use octavia::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-b446553d924dc219.yaml b/releasenotes/notes/add_rabbit_kombu_options-b446553d924dc219.yaml new file mode 100644 index 00000000..8ade1157 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-b446553d924dc219.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/octavia_init_spec.rb b/spec/classes/octavia_init_spec.rb index cb7649a9..7be184f8 100644 --- a/spec/classes/octavia_init_spec.rb +++ b/spec/classes/octavia_init_spec.rb @@ -38,6 +38,7 @@ describe 'octavia' do is_expected.to contain_octavia_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('') is_expected.to contain_octavia_config('oslo_messaging_rabbit/heartbeat_rate').with_value('') is_expected.to contain_octavia_config('oslo_messaging_rabbit/kombu_compression').with_value('') + is_expected.to contain_octavia_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_octavia_config('oslo_messaging_notifications/transport_url').with_value('') is_expected.to contain_octavia_config('oslo_messaging_notifications/driver').with_value('') end @@ -57,6 +58,7 @@ describe 'octavia' do :rabbit_heartbeat_timeout_threshold => '60', :rabbit_heartbeat_rate => '10', :kombu_compression => 'gzip', + :kombu_failover_strategy => 'shuffle', :package_ensure => '2012.1.1-15.el6', :notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :notification_driver => 'ceilometer.compute.octavia_notifier', @@ -72,6 +74,7 @@ describe 'octavia' do is_expected.to contain_octavia_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60') is_expected.to contain_octavia_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10') is_expected.to contain_octavia_config('oslo_messaging_rabbit/kombu_compression').with_value('gzip') + is_expected.to contain_octavia_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('shuffle') end it 'configures various things' do