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: Ifa7b63cf0e0f276c4bdfc1b840506303355647b1 Closes-Bug: #1840868
This commit is contained in:
parent
4656591f71
commit
5d447cbe87
@ -43,6 +43,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_service_default.
|
# Defaults to $::os_service_default.
|
||||||
@ -286,6 +296,7 @@ class heat(
|
|||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
$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,
|
||||||
$kombu_ssl_ca_certs = $::os_service_default,
|
$kombu_ssl_ca_certs = $::os_service_default,
|
||||||
$kombu_ssl_certfile = $::os_service_default,
|
$kombu_ssl_certfile = $::os_service_default,
|
||||||
@ -373,6 +384,7 @@ class heat(
|
|||||||
kombu_compression => $kombu_compression,
|
kombu_compression => $kombu_compression,
|
||||||
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,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_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.
|
@ -34,7 +34,8 @@ describe 'heat' do
|
|||||||
context 'with rabbit heartbeat configured' do
|
context 'with rabbit heartbeat configured' do
|
||||||
before { params.merge!(
|
before { params.merge!(
|
||||||
:rabbit_heartbeat_timeout_threshold => '60',
|
:rabbit_heartbeat_timeout_threshold => '60',
|
||||||
:rabbit_heartbeat_rate => '10' ) }
|
:rabbit_heartbeat_rate => '10',
|
||||||
|
:rabbit_heartbeat_in_pthread => true ) }
|
||||||
it_configures 'a heat base installation'
|
it_configures 'a heat base installation'
|
||||||
it_configures 'rabbit with heartbeat configured'
|
it_configures 'rabbit with heartbeat configured'
|
||||||
end
|
end
|
||||||
@ -160,6 +161,7 @@ describe 'heat' do
|
|||||||
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_heat_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_in_pthread').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_oslo__messaging__rabbit('heat_config').with(
|
is_expected.to contain_oslo__messaging__rabbit('heat_config').with(
|
||||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||||
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
|
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
|
||||||
@ -198,6 +200,7 @@ describe 'heat' do
|
|||||||
end
|
end
|
||||||
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60') }
|
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60') }
|
||||||
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10') }
|
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10') }
|
||||||
|
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/heartbeat_in_pthread').with_value(true) }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'with SSL enabled with kombu' do
|
shared_examples_for 'with SSL enabled with kombu' do
|
||||||
|
Loading…
Reference in New Issue
Block a user