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
diff --git a/lib/rpc_backend b/lib/rpc_backend
index 899748c..ff22bbf 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -158,9 +158,6 @@
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 @@
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