From 7cf7a8f88f05a6e6994dfb2ff3a6643d21c3048e Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 9 Apr 2015 11:46:56 +0200 Subject: [PATCH] rpc: Allow to configure the rabbitmq heartbeat For testing we can need to disable or change the rate of the heartbeat Currently we have to set the value manually in each componments or to write multiple [[post-config|$_CONF]] section in local.conf. This change will allow to configure all componments at once with only two lines. Also, we don't set default values to continue to use oslo.messaging defaults. Change-Id: Ieaca60ca1cd6d7455b66ce490a9b023df431e9c3 --- lib/rpc_backend | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/rpc_backend b/lib/rpc_backend index 2b7c6cbc64..288987cdf0 100644 --- a/lib/rpc_backend +++ b/lib/rpc_backend @@ -273,6 +273,12 @@ function iniset_rpc_backend { iniset $file oslo_messaging_rabbit rabbit_hosts $RABBIT_HOST iniset $file oslo_messaging_rabbit rabbit_password $RABBIT_PASSWORD iniset $file oslo_messaging_rabbit rabbit_userid $RABBIT_USERID + if [ -n "$RABBIT_HEARTBEAT_TIMEOUT_THRESHOLD" ]; then + iniset $file oslo_messaging_rabbit heartbeat_timeout_threshold $RABBIT_HEARTBEAT_TIMEOUT_THRESHOLD + fi + if [ -n "$RABBIT_HEARTBEAT_RATE" ]; then + iniset $file oslo_messaging_rabbit heartbeat_rate $RABBIT_HEARTBEAT_RATE + fi fi }