Merge "Introduce the new rabbit_heartbeat_in_pthread option"
This commit is contained in:
@@ -63,6 +63,16 @@
|
|||||||
# we check the heartbeat. (integer value)
|
# we check the heartbeat. (integer value)
|
||||||
# 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_qos_prefetch_count*]
|
# [*rabbit_qos_prefetch_count*]
|
||||||
# (Optional) Specifies the number of messages to prefetch.
|
# (Optional) Specifies the number of messages to prefetch.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@@ -218,6 +228,7 @@ class ceilometer(
|
|||||||
$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_qos_prefetch_count = $::os_service_default,
|
$rabbit_qos_prefetch_count = $::os_service_default,
|
||||||
$amqp_durable_queues = $::os_service_default,
|
$amqp_durable_queues = $::os_service_default,
|
||||||
$rabbit_use_ssl = $::os_service_default,
|
$rabbit_use_ssl = $::os_service_default,
|
||||||
@@ -284,6 +295,7 @@ class ceilometer(
|
|||||||
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,
|
||||||
rabbit_qos_prefetch_count => $rabbit_qos_prefetch_count,
|
rabbit_qos_prefetch_count => $rabbit_qos_prefetch_count,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
|
@@ -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.
|
@@ -180,6 +180,7 @@ describe 'ceilometer' do
|
|||||||
it 'configures rabbit' do
|
it 'configures rabbit' do
|
||||||
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_in_pthread').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
|
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
|
||||||
@@ -193,6 +194,7 @@ describe 'ceilometer' do
|
|||||||
it 'configures rabbit' do
|
it 'configures rabbit' do
|
||||||
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_in_pthread').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
|
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
|
||||||
@@ -218,11 +220,13 @@ describe 'ceilometer' do
|
|||||||
context "with heartbeat configuration" do
|
context "with heartbeat configuration" 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 { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60') }
|
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60') }
|
||||||
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10') }
|
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10') }
|
||||||
|
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_in_pthread').with_value(true) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user