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|$<APP>_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
This commit is contained in:
Mehdi Abaakouk 2015-04-09 11:46:56 +02:00
parent 9860876f5d
commit 7cf7a8f88f

View File

@ -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
}