Move RABBIT_HOST to lib/rpc_backend

This moves setting of RABBIT_HOST from stack.sh to lib/rpc_backend
so it may be used in grenade runs, which don't have the defaulted
value from stack.sh. The RABBIT_HOST is needed in order to call
get_transport_url in lib/rpc_backend.

Change-Id: I504f7fac7bb9a8c158e20046dbd1dd2d507db02b
Closes-Bug: #1649586
Depends-On: I3d4d7b309e50f4e2970cda55aada02d68c4fa705
This commit is contained in:
Pawel Koniszewski 2016-12-21 13:27:09 +01:00
parent 51a225c5d7
commit 20eb274b75
2 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,9 @@ _XTRACE_RPC_BACKEND=$(set +o | grep xtrace)
set +o xtrace
RABBIT_USERID=${RABBIT_USERID:-stackrabbit}
if is_service_enabled rabbit; then
RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST}
fi
# Functions
# ---------

View File

@ -664,7 +664,6 @@ initialize_database_backends && echo "Using $DATABASE_TYPE database backend" ||
# In multi node DevStack, second node needs ``RABBIT_USERID``, but rabbit
# isn't enabled.
if is_service_enabled rabbit; then
RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST}
read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
fi