From a8f7a62f133976af32736fd892f64b56787ebe3c Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Wed, 1 May 2013 20:48:54 +0000 Subject: [PATCH] Add XAPI config to quantum rootwrap for XS/XCP. * Supports blueprint xenapi-ovs Change-Id: I902458ec26cd07e94fe50bb3648efa75658ccba3 --- lib/quantum_plugins/openvswitch | 11 +++++++---- stack.sh | 2 -- stackrc | 4 ++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/quantum_plugins/openvswitch b/lib/quantum_plugins/openvswitch index ab16483452..f8512cf927 100644 --- a/lib/quantum_plugins/openvswitch +++ b/lib/quantum_plugins/openvswitch @@ -72,10 +72,13 @@ function quantum_plugin_configure_plugin_agent() { AGENT_BINARY="$QUANTUM_DIR/bin/quantum-openvswitch-agent" if [ "$VIRT_DRIVER" = 'xenserver' ]; then - # Nova will always be installed along with quantum for a domU - # devstack install, so it should be safe to rely on nova.conf - # for xenapi configuration. - Q_RR_DOM0_COMMAND="$QUANTUM_DIR/bin/quantum-rootwrap-xen-dom0 $NOVA_CONF" + Q_RR_DOM0_COMMAND="$QUANTUM_DIR/bin/quantum-rootwrap-xen-dom0 $Q_RR_CONF_FILE" + + # For now, duplicate the xen configuration already found in nova.conf + iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_url "$XENAPI_CONNECTION_URL" + iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_username "$XENAPI_USER" + iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_password "$XENAPI_PASSWORD" + # Under XS/XCP, the ovs agent needs to target the dom0 # integration bridge. This is enabled by using a root wrapper # that executes commands on dom0 via a XenAPI plugin. diff --git a/stack.sh b/stack.sh index d534b87ddb..d43c9487c7 100755 --- a/stack.sh +++ b/stack.sh @@ -924,8 +924,6 @@ if is_service_enabled nova; then echo_summary "Using XenServer virtualization driver" read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN." iniset $NOVA_CONF DEFAULT compute_driver "xenapi.XenAPIDriver" - XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"} - XENAPI_USER=${XENAPI_USER:-"root"} iniset $NOVA_CONF DEFAULT xenapi_connection_url "$XENAPI_CONNECTION_URL" iniset $NOVA_CONF DEFAULT xenapi_connection_username "$XENAPI_USER" iniset $NOVA_CONF DEFAULT xenapi_connection_password "$XENAPI_PASSWORD" diff --git a/stackrc b/stackrc index f99eab1852..6dcb462cc7 100644 --- a/stackrc +++ b/stackrc @@ -224,6 +224,10 @@ PUBLIC_NETWORK_NAME=${PUBLIC_NETWORK_NAME:-"public"} # Compatibility until it's eradicated from CI USE_SCREEN=${SCREEN_DEV:-$USE_SCREEN} +# Xen config common to nova and quantum +XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"} +XENAPI_USER=${XENAPI_USER:-"root"} + # Local variables: # mode: shell-script # End: