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: Ia08af6da0976697d65bcc1b55b857b0f4a5742bc Closes-Bug: #1748353
This commit is contained in:
parent
cfd410eff3
commit
15265bd46f
|
@ -95,6 +95,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
|
||||
#
|
||||
# [*notification_driver*]
|
||||
# (optional) Driver used for issuing notifications
|
||||
# Defaults to 'messaging'
|
||||
|
@ -165,6 +171,7 @@ class designate(
|
|||
$kombu_ssl_keyfile = $::os_service_default,
|
||||
$kombu_ssl_version = $::os_service_default,
|
||||
$kombu_reconnect_delay = $::os_service_default,
|
||||
$kombu_failover_strategy = $::os_service_default,
|
||||
$notification_driver = 'messaging',
|
||||
$default_transport_url = $::os_service_default,
|
||||
$rpc_response_timeout = $::os_service_default,
|
||||
|
@ -250,20 +257,21 @@ to your desired configuration.")
|
|||
}
|
||||
|
||||
oslo::messaging::rabbit { 'designate_config':
|
||||
kombu_ssl_version => $kombu_ssl_version,
|
||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_use_ssl => $rabbit_use_ssl,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_ha_queues => $rabbit_ha_queues_real,
|
||||
amqp_durable_queues => $amqp_durable_queues,
|
||||
kombu_ssl_version => $kombu_ssl_version,
|
||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||
kombu_failover_strategy => $kombu_failover_strategy,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_use_ssl => $rabbit_use_ssl,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_ha_queues => $rabbit_ha_queues_real,
|
||||
amqp_durable_queues => $amqp_durable_queues,
|
||||
}
|
||||
|
||||
oslo::messaging::default { 'designate_config':
|
||||
|
|
|
@ -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.
|
|
@ -42,47 +42,50 @@ describe 'designate' do
|
|||
|
||||
let :rabbit_use_ssl do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_certfile => 'cert goes here',
|
||||
:kombu_ssl_keyfile => 'key goes here',
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
:kombu_reconnect_delay => '1.0',
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_certfile => 'cert goes here',
|
||||
:kombu_ssl_keyfile => 'key goes here',
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
:kombu_reconnect_delay => '1.0',
|
||||
:kombu_failover_strategy => 'shuffle',
|
||||
}
|
||||
end
|
||||
|
||||
let :rabbit_use_ssl_cert_no_key do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_certfile => 'cert goes here',
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
:kombu_reconnect_delay => '1.0',
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_certfile => 'cert goes here',
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
:kombu_reconnect_delay => '1.0',
|
||||
:kombu_failover_strategy => 'shuffle',
|
||||
}
|
||||
end
|
||||
|
||||
let :rabbit_use_ssl_key_no_cert do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_keyfile => 'key goes here',
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
:kombu_reconnect_delay => '1.0',
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_keyfile => 'key goes here',
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
:kombu_reconnect_delay => '1.0',
|
||||
:kombu_failover_strategy => 'shuffle',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -191,6 +194,7 @@ describe 'designate' do
|
|||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value( params[:kombu_reconnect_delay] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value( params[:kombu_failover_strategy] )
|
||||
is_expected.to contain_oslo__messaging__rabbit('designate_config').with(
|
||||
:rabbit_use_ssl => params[:rabbit_use_ssl],
|
||||
:kombu_ssl_ca_certs => params[:kombu_ssl_ca_certs],
|
||||
|
|
Loading…
Reference in New Issue