Set QPID_HOST parameter to better support multi-node mode

When deploying OpenStack in a multi-node configuration,
the Qpid clients need the hostname of the potentially
remote Qpid server in order to permit the necessary RPC
communication between components.

Fixes bug #1196521

Change-Id: Iee3c3747cedea9488ec345e78f8eddbc6e850573
diff --git a/lib/rpc_backend b/lib/rpc_backend
index 4b04053..462e6cc 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -170,8 +170,9 @@
         # 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
-    elif is_service_enabled qpid; then
+    elif is_service_enabled qpid || [ -n "$QPID_HOST" ]; then
         iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_qpid
+        iniset $file $section qpid_hostname $QPID_HOST
         if is_ubuntu; then
             QPID_PASSWORD=`sudo strings /etc/qpid/qpidd.sasldb | grep -B1 admin | head -1`
             iniset $file $section qpid_password $QPID_PASSWORD