diff --git a/manifests/init.pp b/manifests/init.pp index f2d238c..841e68a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -58,6 +58,16 @@ # every 30 seconds. # 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*] # (Optional) Connect over SSL for rabbit # Defaults to $::os_service_default @@ -181,6 +191,7 @@ class magnum( $rabbit_ha_queues = $::os_service_default, $rabbit_heartbeat_timeout_threshold = $::os_service_default, $rabbit_heartbeat_rate = $::os_service_default, + $rabbit_heartbeat_in_pthread = $::os_service_default, $rabbit_use_ssl = $::os_service_default, $kombu_ssl_ca_certs = $::os_service_default, $kombu_ssl_certfile = $::os_service_default, @@ -228,6 +239,7 @@ class magnum( rabbit_ha_queues => $rabbit_ha_queues, heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, heartbeat_rate => $rabbit_heartbeat_rate, + heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, rabbit_use_ssl => $rabbit_use_ssl, kombu_reconnect_delay => $kombu_reconnect_delay, kombu_failover_strategy => $kombu_failover_strategy, diff --git a/releasenotes/notes/rabbitmq-heartbeat-over-pthread-acbbf51a14abb6c0.yaml b/releasenotes/notes/rabbitmq-heartbeat-over-pthread-acbbf51a14abb6c0.yaml new file mode 100644 index 0000000..496d227 --- /dev/null +++ b/releasenotes/notes/rabbitmq-heartbeat-over-pthread-acbbf51a14abb6c0.yaml @@ -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. diff --git a/spec/classes/magnum_init_spec.rb b/spec/classes/magnum_init_spec.rb index bcdbeaa..245b9ab 100644 --- a/spec/classes/magnum_init_spec.rb +++ b/spec/classes/magnum_init_spec.rb @@ -35,6 +35,7 @@ describe 'magnum' do :rabbit_ha_queues => '', :heartbeat_timeout_threshold => '', :heartbeat_rate => '', + :heartbeat_in_pthread => '', :rabbit_use_ssl => '', :kombu_reconnect_delay => '', :kombu_failover_strategy => '', @@ -68,6 +69,7 @@ describe 'magnum' do :rabbit_ha_queues => true, :rabbit_heartbeat_timeout_threshold => 60, :rabbit_heartbeat_rate => 10, + :rabbit_heartbeat_in_pthread => true, :amqp_durable_queues => true, } end @@ -90,6 +92,7 @@ describe 'magnum' do :rabbit_ha_queues => true, :heartbeat_timeout_threshold => 60, :heartbeat_rate => 10, + :heartbeat_in_pthread => true, :rabbit_use_ssl => '', :kombu_reconnect_delay => '', :kombu_failover_strategy => 'shuffle',