From f5fb057a8d58fdf1316f54b7c528740f1dc0a907 Mon Sep 17 00:00:00 2001 From: Dan Wendlandt Date: Mon, 16 Jan 2012 14:46:01 -0800 Subject: [PATCH] Fix several issues with devstack and Quantum + OVS plugin - flag telling nova quantum manager to use DHCP is incorrect - OVS quantum plugin no longer has default sql_connection string. - only run quantum OVS agent is openvswitch is enabled - add ovs-vsctl to sudoers file. Change-Id: I1e9b3fe987b3e29d0d4f670b2d964777d9cc3e1b --- files/sudo/nova | 1 + stack.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/files/sudo/nova b/files/sudo/nova index 0a79c210a0..bde15193b3 100644 --- a/files/sudo/nova +++ b/files/sudo/nova @@ -41,6 +41,7 @@ Cmnd_Alias NOVADEVCMDS = /bin/chmod /var/lib/nova/tmp/*/root/.ssh, \ /usr/bin/socat, \ /sbin/parted, \ /usr/sbin/dnsmasq, \ + /usr/bin/ovs-vsctl, \ /usr/sbin/arping %USER% ALL = (root) NOPASSWD: SETENV: NOVADEVCMDS diff --git a/stack.sh b/stack.sh index c3fe990f2f..c4655e75f4 100755 --- a/stack.sh +++ b/stack.sh @@ -1104,7 +1104,7 @@ if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then add_nova_flag "--libvirt_vif_type=ethernet" add_nova_flag "--libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver" add_nova_flag "--linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver" - add_nova_flag "--quantum-use-dhcp" + add_nova_flag "--quantum_use_dhcp" fi else add_nova_flag "--network_manager=nova.network.manager.$NET_MAN" @@ -1315,10 +1315,13 @@ if [[ "$ENABLED_SERVICES" =~ "q-agt" ]]; then sudo ovs-vsctl --no-wait -- --if-exists del-br $OVS_BRIDGE sudo ovs-vsctl --no-wait add-br $OVS_BRIDGE sudo ovs-vsctl --no-wait br-set-external-id $OVS_BRIDGE bridge-id br-int + + # Start up the quantum <-> openvswitch agent + QUANTUM_OVS_CONFIG_FILE=$QUANTUM_DIR/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini + sed -i -e "s/^sql_connection =.*$/sql_connection = mysql:\/\/$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST\/ovs_quantum/g" $QUANTUM_OVS_CONFIG_FILE + screen_it q-agt "sleep 4; sudo python $QUANTUM_DIR/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py $QUANTUM_OVS_CONFIG_FILE -v" fi - # Start up the quantum <-> openvswitch agent - screen_it q-agt "sleep 4; sudo python $QUANTUM_DIR/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py $QUANTUM_DIR/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini -v" fi # If we're using Quantum (i.e. q-svc is enabled), network creation has to