Refactor rpc backend configuration logic
This commit also changes the following:
- Fixes Nova QPID module path
- Fixes a bug Cinder ZeroMQ RPC points to nova module
- Adds ZeroMQ setting for Heat RPC
qpid_is_supported is moved from functions to lib/rpc_backend.
This work is based on the work by Isaku Yamahata <yamahata@valinux.co.jp>
in https://review.openstack.org/#/c/19074/.
Change-Id: I45e21b1fb85e539213f5243764132a37906d7455
diff --git a/lib/quantum b/lib/quantum
index 343e5a9..19df499 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -176,7 +176,7 @@
# Set common config for all quantum server and agents.
function configure_quantum() {
_configure_quantum_common
- _configure_quantum_rpc
+ iniset_rpc_backend quantum $QUANTUM_CONF DEFAULT
if is_service_enabled q-svc; then
_configure_quantum_service
@@ -596,19 +596,6 @@
AGENT_BINARY="$QUANTUM_DIR/quantum/plugins/ryu/agent/ryu_quantum_agent.py"
}
-# Quantum RPC support - must be updated prior to starting any of the services
-function _configure_quantum_rpc() {
- iniset $QUANTUM_CONF DEFAULT control_exchange quantum
- if is_service_enabled qpid ; then
- iniset $QUANTUM_CONF DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid
- elif is_service_enabled zeromq; then
- iniset $QUANTUM_CONF DEFAULT rpc_backend quantum.openstack.common.rpc.impl_zmq
- elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then
- iniset $QUANTUM_CONF DEFAULT rabbit_host $RABBIT_HOST
- iniset $QUANTUM_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
- fi
-}
-
# _configure_quantum_service() - Set config files for quantum service
# It is called when q-svc is enabled.
function _configure_quantum_service() {