Fix matchmaker-redis dependencies for zeromq driver

Add an option 'ZEROMQ_MATCHMAKER' to indicate which
matchmaker driver to use.

When it indicates 'redis', the dependencies will be
installed.

Change-Id: I910b48347bad0685ea10083a3b0b243524f32095
Partially-Implements: blueprint zeromq
This commit is contained in:
Li Ma 2014-12-21 23:36:43 -08:00
parent 29e34f7c9f
commit d3ca1418c4

View File

@ -87,11 +87,20 @@ function cleanup_rpc_backend {
fi
elif is_service_enabled zeromq; then
if is_fedora; then
uninstall_package zeromq python-zmq redis
uninstall_package zeromq python-zmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
uninstall_package redis python-redis
fi
elif is_ubuntu; then
uninstall_package libzmq1 python-zmq redis-server
uninstall_package libzmq1 python-zmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
uninstall_package redis-server python-redis
fi
elif is_suse; then
uninstall_package libzmq1 python-pyzmq redis
uninstall_package libzmq1 python-pyzmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
uninstall_package redis python-redis
fi
else
exit_distro_not_supported "zeromq installation"
fi
@ -150,11 +159,20 @@ function install_rpc_backend {
# 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 redis
install_package zeromq python-zmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
install_package redis python-redis
fi
elif is_ubuntu; then
install_package libzmq1 python-zmq redis-server
install_package libzmq1 python-zmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
install_package redis-server python-redis
fi
elif is_suse; then
install_package libzmq1 python-pyzmq redis
install_package libzmq1 python-pyzmq
if [ "$ZEROMQ_MATCHMAKER" == "redis" ]; then
install_package redis python-redis
fi
else
exit_distro_not_supported "zeromq installation"
fi