Add check for RABBIT_HOST and RABBIT_PASSWORD in iniset_rpc_backend

In multi-node environment, RABBIT_HOST and RABBIT_PASSWORD are used to
indicate the server running rabbitmq service. We should check the
variables in iniset_rpc_backend.

Change-Id: Iaea8cc87315be91429a8747254310d6474930eec
This commit is contained in:
jiajun xu 2013-01-22 11:49:03 +08:00
parent 0dd34df455
commit 4a30b849ec

View File

@ -100,7 +100,7 @@ function iniset_rpc_backend() {
iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_zmq
elif is_service_enabled qpid; then
iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_qpid
elif is_service_enabled rabbit; then
elif is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then
iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_kombu
iniset $file $section rabbit_host $RABBIT_HOST
iniset $file $section rabbit_password $RABBIT_PASSWORD