Complete the support of MatchMakerRedis driver

MatchMakerRedis is the only tested routing method
for ZeroMQ driver. For others, like MatchMakerLocalhost
and MatchMakerRing, it still takes some time to work
on and completely test.

MatchMakerRedis is enough to run under real-world
deployment.

Change-Id: I3b2e8e68ceebd377479d75bbb8b862ae60cfc826
Partially-Implements: blueprint zeromq
This commit is contained in:
Li Ma 2014-12-21 23:51:40 -08:00
parent c8b2f60a54
commit c24b399b7e

View File

@ -158,9 +158,6 @@ function install_rpc_backend {
fi
_configure_qpid
elif is_service_enabled zeromq; then
# NOTE(ewindisch): Redis is not strictly necessary
# but there is a matchmaker driver that works
# really well & out of the box for multi-node.
if is_fedora; then
install_package zeromq python-zmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
@ -243,11 +240,15 @@ function iniset_rpc_backend {
local section=$3
if is_service_enabled zeromq; then
iniset $file $section rpc_backend "zmq"
iniset $file $section rpc_zmq_matchmaker \
oslo_messaging._drivers.matchmaker_redis.MatchMakerRedis
# Set MATCHMAKER_REDIS_HOST if running multi-node.
MATCHMAKER_REDIS_HOST=${MATCHMAKER_REDIS_HOST:-127.0.0.1}
iniset $file matchmaker_redis host $MATCHMAKER_REDIS_HOST
iniset $file $section rpc_zmq_host `hostname`
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
iniset $file $section rpc_zmq_matchmaker \
oslo.messaging._drivers.matchmaker_redis.MatchMakerRedis
MATCHMAKER_REDIS_HOST=${MATCHMAKER_REDIS_HOST:-127.0.0.1}
iniset $file matchmaker_redis host $MATCHMAKER_REDIS_HOST
else
die $LINENO "Other matchmaker drivers not supported"
fi
elif is_service_enabled qpid || [ -n "$QPID_HOST" ]; then
# For Qpid use the 'amqp' oslo.messaging transport when AMQP 1.0 is used
if [ "$RPC_MESSAGING_PROTOCOL" == "AMQP1" ]; then