From bff593d9282742aa7e7f2feeb3f3862978a1ea99 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Mon, 16 Jul 2012 18:02:37 -0400 Subject: [PATCH] Devstack support for Quantum DHCP Fixes bug 1019462. A new screen q-dhcp is created for the agent output. Change-Id: Ie7f21a5f76ea7988ce817568edac7222cf7063d1 --- AUTHORS | 1 + stack.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/AUTHORS b/AUTHORS index 80d8942ff3..6141d675e2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,6 +14,7 @@ Eddie Hebert Eoghan Glynn Eric Windisch Gabriel Hurley +Gary Kotton Hengqing Hu Hua ZHANG Jake Dahn diff --git a/stack.sh b/stack.sh index f7663acde2..d3de7162f2 100755 --- a/stack.sh +++ b/stack.sh @@ -1145,6 +1145,37 @@ if is_service_enabled q-agt; then screen_it q-agt "sudo python $AGENT_BINARY /$Q_PLUGIN_CONF_FILE -v" fi +# Quantum DHCP +if is_service_enabled q-dhcp; then + AGENT_DHCP_BINARY="$QUANTUM_DIR/bin/quantum-dhcp-agent" + + Q_DHCP_CONF_FILE=/etc/quantum/dhcp_agent.ini + + if [[ -e $QUANTUM_DIR/etc/dhcp_agent.ini ]]; then + sudo cp $QUANTUM_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE + fi + + # Set verbose + iniset $Q_DHCP_CONF_FILE DEFAULT verbose True + # Set debug + iniset $Q_DHCP_CONF_FILE DEFAULT debug True + + # Update database + iniset $Q_DHCP_CONF_FILE DEFAULT db_connection "mysql:\/\/$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST\/$Q_DB_NAME?charset=utf8" + iniset $Q_DHCP_CONF_FILE DEFAULT auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v2.0" + iniset $Q_DHCP_CONF_FILE DEFAULT admin_tenant_name $SERVICE_TENANT_NAME + iniset $Q_DHCP_CONF_FILE DEFAULT admin_user $Q_ADMIN_USERNAME + iniset $Q_DHCP_CONF_FILE DEFAULT admin_password $SERVICE_PASSWORD + + if [[ "$Q_PLUGIN" = "openvswitch" ]]; then + iniset $Q_DHCP_CONF_FILE DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver + elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then + iniset $Q_DHCP_CONF_FILE DEFAULT interface_driver quantum.agent.linux.interface.BridgeInterfaceDriver + fi + # Start up the quantum agent + screen_it q-dhcp "sudo python $AGENT_DHCP_BINARY --config-file=$Q_DHCP_CONF_FILE" +fi + # Melange service if is_service_enabled m-svc; then if is_service_enabled mysql; then