Introduce the new rabbit_heartbeat_in_pthread option
oslo.messaging RabbitMQ driver have now a new option that allow user to run the RabbitMQ heartbeat over a native python thread. These change allow user to use this new option. Change-Id: If5cb4855e20fe9553b4a4a0d787918923a4334ba Closes-Bug: #1840868
This commit is contained in:
parent
512c635280
commit
4e2c15e763
@ -190,6 +190,16 @@
|
|||||||
# every 30 seconds.
|
# every 30 seconds.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*rabbit_heartbeat_in_pthread*]
|
||||||
|
# (Optional) EXPERIMENTAL: Run the health check heartbeat thread
|
||||||
|
# through a native python thread. By default if this
|
||||||
|
# option isn't provided the health check heartbeat will
|
||||||
|
# inherit the execution model from the parent process. By
|
||||||
|
# example if the parent process have monkey patched the
|
||||||
|
# stdlib by using eventlet/greenlet then the heartbeat
|
||||||
|
# will be run through a green thread.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*rabbit_use_ssl*]
|
# [*rabbit_use_ssl*]
|
||||||
# (Optional) Connect over SSL for RabbitMQ
|
# (Optional) Connect over SSL for RabbitMQ
|
||||||
# Defaults to $::os_serice_default
|
# Defaults to $::os_serice_default
|
||||||
@ -632,6 +642,7 @@ class keystone(
|
|||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||||
$rabbit_heartbeat_rate = $::os_service_default,
|
$rabbit_heartbeat_rate = $::os_service_default,
|
||||||
|
$rabbit_heartbeat_in_pthread = $::os_service_default,
|
||||||
$rabbit_use_ssl = $::os_service_default,
|
$rabbit_use_ssl = $::os_service_default,
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
@ -890,6 +901,7 @@ admin_token will be removed in a later release")
|
|||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||||
|
heartbeat_in_pthread => $rabbit_heartbeat_in_pthread,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Allow users to run the RabbitMQ heartbeat over a native python thread in the
|
||||||
|
oslo.messaging RabbitMQ driver, by using the `rabbit_heartbeat_in_pthread`
|
||||||
|
option in configuration.
|
@ -50,6 +50,7 @@ describe 'keystone' do
|
|||||||
'notification_transport_url' => '<SERVICE DEFAULT>',
|
'notification_transport_url' => '<SERVICE DEFAULT>',
|
||||||
'rabbit_heartbeat_timeout_threshold' => '<SERVICE DEFAULT>',
|
'rabbit_heartbeat_timeout_threshold' => '<SERVICE DEFAULT>',
|
||||||
'rabbit_heartbeat_rate' => '<SERVICE DEFAULT>',
|
'rabbit_heartbeat_rate' => '<SERVICE DEFAULT>',
|
||||||
|
'rabbit_heartbeat_in_pthread' => '<SERVICE DEFAULT>',
|
||||||
'amqp_durable_queues' => '<SERVICE DEFAULT>',
|
'amqp_durable_queues' => '<SERVICE DEFAULT>',
|
||||||
'admin_workers' => 20,
|
'admin_workers' => 20,
|
||||||
'public_workers' => 20,
|
'public_workers' => 20,
|
||||||
@ -90,6 +91,7 @@ describe 'keystone' do
|
|||||||
'notification_transport_url' => 'rabbit://user:pass@host:1234/virt',
|
'notification_transport_url' => 'rabbit://user:pass@host:1234/virt',
|
||||||
'rabbit_heartbeat_timeout_threshold' => '60',
|
'rabbit_heartbeat_timeout_threshold' => '60',
|
||||||
'rabbit_heartbeat_rate' => '10',
|
'rabbit_heartbeat_rate' => '10',
|
||||||
|
'rabbit_heartbeat_in_pthread' => true,
|
||||||
'rabbit_ha_queues' => true,
|
'rabbit_ha_queues' => true,
|
||||||
'amqp_durable_queues' => true,
|
'amqp_durable_queues' => true,
|
||||||
'default_domain' => 'other_domain',
|
'default_domain' => 'other_domain',
|
||||||
@ -208,6 +210,7 @@ describe 'keystone' do
|
|||||||
it 'should contain correct rabbit heartbeat configuration' do
|
it 'should contain correct rabbit heartbeat configuration' do
|
||||||
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value(param_hash['rabbit_heartbeat_timeout_threshold'])
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value(param_hash['rabbit_heartbeat_timeout_threshold'])
|
||||||
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_rate').with_value(param_hash['rabbit_heartbeat_rate'])
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_rate').with_value(param_hash['rabbit_heartbeat_rate'])
|
||||||
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_in_pthread').with_value(param_hash['rabbit_heartbeat_in_pthread'])
|
||||||
is_expected.to contain_keystone_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(param_hash['amqp_durable_queues'])
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(param_hash['amqp_durable_queues'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user