Merge "Add support for RabbitMQ connection heartbeat"
This commit is contained in:
@@ -72,6 +72,21 @@
|
|||||||
# (optional) Use HA queues in RabbitMQ.
|
# (optional) Use HA queues in RabbitMQ.
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*rabbit_heartbeat_timeout_threshold*]
|
||||||
|
# (optional) Number of seconds after which the RabbitMQ broker is considered
|
||||||
|
# down if the heartbeat keepalive fails. Any value >0 enables heartbeats.
|
||||||
|
# Heartbeating helps to ensure the TCP connection to RabbitMQ isn't silently
|
||||||
|
# closed, resulting in missed or lost messages from the queue.
|
||||||
|
# (Requires kombu >= 3.0.7 and amqp >= 1.4.0)
|
||||||
|
# Defaults to 0
|
||||||
|
#
|
||||||
|
# [*rabbit_heartbeat_rate*]
|
||||||
|
# (optional) How often during the rabbit_heartbeat_timeout_threshold period to
|
||||||
|
# check the heartbeat on RabbitMQ connection. (i.e. rabbit_heartbeat_rate=2
|
||||||
|
# when rabbit_heartbeat_timeout_threshold=60, the heartbeat will be checked
|
||||||
|
# every 30 seconds.
|
||||||
|
# Defaults to 2
|
||||||
|
#
|
||||||
# [*kombu_ssl_ca_certs*]
|
# [*kombu_ssl_ca_certs*]
|
||||||
# (optional) SSL certification authority file (valid only if SSL enabled).
|
# (optional) SSL certification authority file (valid only if SSL enabled).
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
@@ -263,6 +278,8 @@ class nova(
|
|||||||
$rabbit_userid = 'guest',
|
$rabbit_userid = 'guest',
|
||||||
$rabbit_virtual_host = '/',
|
$rabbit_virtual_host = '/',
|
||||||
$rabbit_use_ssl = false,
|
$rabbit_use_ssl = false,
|
||||||
|
$rabbit_heartbeat_timeout_threshold = 0,
|
||||||
|
$rabbit_heartbeat_rate = 2,
|
||||||
$rabbit_ha_queues = undef,
|
$rabbit_ha_queues = undef,
|
||||||
$kombu_ssl_ca_certs = undef,
|
$kombu_ssl_ca_certs = undef,
|
||||||
$kombu_ssl_certfile = undef,
|
$kombu_ssl_certfile = undef,
|
||||||
@@ -463,6 +480,8 @@ class nova(
|
|||||||
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
|
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
|
||||||
'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host;
|
'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||||
'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl;
|
'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;
|
||||||
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues;
|
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ describe 'nova' do
|
|||||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5672')
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5672')
|
||||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest')
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest')
|
||||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('0')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_rate').with_value('2')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures various things' do
|
it 'configures various things' do
|
||||||
@@ -97,6 +99,8 @@ describe 'nova' do
|
|||||||
:rabbit_port => '5673',
|
:rabbit_port => '5673',
|
||||||
:rabbit_password => 'password',
|
:rabbit_password => 'password',
|
||||||
:rabbit_ha_queues => 'undef',
|
:rabbit_ha_queues => 'undef',
|
||||||
|
:rabbit_heartbeat_timeout_threshold => '60',
|
||||||
|
:rabbit_heartbeat_rate => '10',
|
||||||
:lock_path => '/var/locky/path',
|
:lock_path => '/var/locky/path',
|
||||||
:state_path => '/var/lib/nova2',
|
:state_path => '/var/lib/nova2',
|
||||||
:service_down_time => '120',
|
:service_down_time => '120',
|
||||||
@@ -133,6 +137,8 @@ describe 'nova' do
|
|||||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
|
||||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user')
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user')
|
||||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60')
|
||||||
|
is_expected.to contain_nova_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures memcached_servers' do
|
it 'configures memcached_servers' do
|
||||||
|
|||||||
Reference in New Issue
Block a user