Browse code

Merge "Add XAPI config to quantum rootwrap for XS/XCP."

Jenkins authored on 2013/05/16 01:50:16
Showing 3 changed files
... ...
@@ -72,10 +72,13 @@ function quantum_plugin_configure_plugin_agent() {
72 72
     AGENT_BINARY="$QUANTUM_DIR/bin/quantum-openvswitch-agent"
73 73
 
74 74
     if [ "$VIRT_DRIVER" = 'xenserver' ]; then
75
-        # Nova will always be installed along with quantum for a domU
76
-        # devstack install, so it should be safe to rely on nova.conf
77
-        # for xenapi configuration.
78
-        Q_RR_DOM0_COMMAND="$QUANTUM_DIR/bin/quantum-rootwrap-xen-dom0 $NOVA_CONF"
75
+        Q_RR_DOM0_COMMAND="$QUANTUM_DIR/bin/quantum-rootwrap-xen-dom0 $Q_RR_CONF_FILE"
76
+
77
+        # For now, duplicate the xen configuration already found in nova.conf
78
+        iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_url "$XENAPI_CONNECTION_URL"
79
+        iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_username "$XENAPI_USER"
80
+        iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_password "$XENAPI_PASSWORD"
81
+
79 82
         # Under XS/XCP, the ovs agent needs to target the dom0
80 83
         # integration bridge.  This is enabled by using a root wrapper
81 84
         # that executes commands on dom0 via a XenAPI plugin.
... ...
@@ -956,8 +956,6 @@ if is_service_enabled nova; then
956 956
         echo_summary "Using XenServer virtualization driver"
957 957
         read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN."
958 958
         iniset $NOVA_CONF DEFAULT compute_driver "xenapi.XenAPIDriver"
959
-        XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"}
960
-        XENAPI_USER=${XENAPI_USER:-"root"}
961 959
         iniset $NOVA_CONF DEFAULT xenapi_connection_url "$XENAPI_CONNECTION_URL"
962 960
         iniset $NOVA_CONF DEFAULT xenapi_connection_username "$XENAPI_USER"
963 961
         iniset $NOVA_CONF DEFAULT xenapi_connection_password "$XENAPI_PASSWORD"
... ...
@@ -234,6 +234,10 @@ PUBLIC_NETWORK_NAME=${PUBLIC_NETWORK_NAME:-"public"}
234 234
 # Compatibility until it's eradicated from CI
235 235
 USE_SCREEN=${SCREEN_DEV:-$USE_SCREEN}
236 236
 
237
+# Xen config common to nova and quantum
238
+XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"}
239
+XENAPI_USER=${XENAPI_USER:-"root"}
240
+
237 241
 # Local variables:
238 242
 # mode: shell-script
239 243
 # End: