Merge "Add kombu_reconnect_delay option"

This commit is contained in:
Jenkins 2015-09-24 20:13:09 +00:00 committed by Gerrit Code Review
commit ee5379858d
2 changed files with 19 additions and 0 deletions

View File

@ -105,6 +105,11 @@
# available on some distributions.
# Defaults to 'TLSv1'
#
# [*kombu_reconnect_delay*]
# (optional) How long to wait before reconnecting in response to an AMQP
# consumer cancel notification.
# Defaults to '1.0'
#
# [*amqp_durable_queues*]
# (optional) Define queues as "durable" to rabbitmq.
# Defaults to false
@ -289,6 +294,7 @@ class nova(
$kombu_ssl_certfile = undef,
$kombu_ssl_keyfile = undef,
$kombu_ssl_version = 'TLSv1',
$kombu_reconnect_delay = '1.0',
$amqp_durable_queues = false,
$qpid_hostname = 'localhost',
$qpid_port = '5672',
@ -481,6 +487,7 @@ class nova(
'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl;
'oslo_messaging_rabbit/heartbeat_timeout_threshold': value => $rabbit_heartbeat_timeout_threshold;
'oslo_messaging_rabbit/heartbeat_rate': value => $rabbit_heartbeat_rate;
'oslo_messaging_rabbit/kombu_reconnect_delay': value => $kombu_reconnect_delay;
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues;
}

View File

@ -237,6 +237,7 @@ describe 'nova' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('1.0')
is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent')
@ -256,10 +257,21 @@ describe 'nova' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('1.0')
is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false)
end
end
context 'with kombu_reconnect_delay set to 5.0' do
let :params do
{ :kombu_reconnect_delay => '5.0' }
end
it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('5.0')
end
end
context 'with rabbit_ha_queues set to true' do
let :params do
{ :rabbit_ha_queues => 'true' }