Browse code

Merge "ZeroMQ driver to default to redis matchmaker"

Jenkins authored on 2013/05/29 05:56:06
Showing 2 changed files
... ...
@@ -153,6 +153,7 @@ You can then run many compute nodes, each of which should have a `stackrc` which
153 153
     MYSQL_HOST=$SERVICE_HOST
154 154
     RABBIT_HOST=$SERVICE_HOST
155 155
     Q_HOST=$SERVICE_HOST
156
+    MATCHMAKER_REDIS_HOST=$SERVICE_HOST
156 157
 
157 158
 # Cells
158 159
 
... ...
@@ -78,11 +78,11 @@ function cleanup_rpc_backend {
78 78
         fi
79 79
     elif is_service_enabled zeromq; then
80 80
         if is_fedora; then
81
-            uninstall_package zeromq python-zmq
81
+            uninstall_package zeromq python-zmq redis
82 82
         elif is_ubuntu; then
83
-            uninstall_package libzmq1 python-zmq
83
+            uninstall_package libzmq1 python-zmq redis-server
84 84
         elif is_suse; then
85
-            uninstall_package libzmq1 python-pyzmq
85
+            uninstall_package libzmq1 python-pyzmq redis
86 86
         else
87 87
             exit_distro_not_supported "zeromq installation"
88 88
         fi
... ...
@@ -119,12 +119,15 @@ function install_rpc_backend() {
119 119
             exit_distro_not_supported "qpid installation"
120 120
         fi
121 121
     elif is_service_enabled zeromq; then
122
+        # NOTE(ewindisch): Redis is not strictly necessary
123
+        # but there is a matchmaker driver that works
124
+        # really well & out of the box for multi-node.
122 125
         if is_fedora; then
123
-            install_package zeromq python-zmq
126
+            install_package zeromq python-zmq redis
124 127
         elif is_ubuntu; then
125
-            install_package libzmq1 python-zmq
128
+            install_package libzmq1 python-zmq redis-server
126 129
         elif is_suse; then
127
-            install_package libzmq1 python-pyzmq
130
+            install_package libzmq1 python-pyzmq redis
128 131
         else
129 132
             exit_distro_not_supported "zeromq installation"
130 133
         fi
... ...
@@ -162,6 +165,11 @@ function iniset_rpc_backend() {
162 162
     local section=$3
163 163
     if is_service_enabled zeromq; then
164 164
         iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_zmq
165
+        iniset $file $section rpc_zmq_matchmaker \
166
+            ${package}.openstack.common.rpc.matchmaker_redis.MatchMakerRedis
167
+        # Set MATCHMAKER_REDIS_HOST if running multi-node.
168
+        MATCHMAKER_REDIS_HOST=${MATCHMAKER_REDIS_HOST:-127.0.0.1}
169
+        iniset $file matchmaker_redis host $MATCHMAKER_REDIS_HOST
165 170
     elif is_service_enabled qpid; then
166 171
         iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_qpid
167 172
         if is_ubuntu; then