diff --git a/manifests/api.pp b/manifests/api.pp index 228a6464..ae0d6cfb 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -174,6 +174,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. @@ -304,6 +310,7 @@ class barbican::api ( $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, $auth_strategy = 'keystone', $manage_service = true, @@ -393,6 +400,7 @@ the future release. Please use barbican::api::package_ensure instead.") 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-81a0ef4ac97e5a3a.yaml b/releasenotes/notes/add_rabbit_kombu_options-81a0ef4ac97e5a3a.yaml new file mode 100644 index 00000000..8ade1157 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-81a0ef4ac97e5a3a.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/barbican_api_spec.rb b/spec/classes/barbican_api_spec.rb index e5e283b4..0c66b47f 100644 --- a/spec/classes/barbican_api_spec.rb +++ b/spec/classes/barbican_api_spec.rb @@ -56,6 +56,7 @@ describe 'barbican::api' do :kombu_ssl_keyfile => '', :kombu_ssl_version => '', :kombu_reconnect_delay => '', + :kombu_failover_strategy => '', :manage_service => true, :enabled => true, :enabled_secretstore_plugins => [''], @@ -104,6 +105,7 @@ describe 'barbican::api' do :kombu_ssl_keyfile => 'path_to_keyfile', :kombu_ssl_version => '1.2', :kombu_reconnect_delay => '10', + :kombu_failover_strategy => 'shuffle', :enabled_secretstore_plugins => ['dogtag_crypto', 'store_crypto', 'kmip'], :enabled_crypto_plugins => ['simple_crypto'], :enabled_certificate_plugins => ['simple_certificate', 'dogtag'], @@ -187,6 +189,7 @@ describe 'barbican::api' do it 'configures kombu params' do is_expected.to contain_barbican_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value(param_hash[:kombu_reconnect_delay]) + is_expected.to contain_barbican_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value(param_hash[:kombu_failover_strategy]) end it 'configures enabled plugins' do