From fddd8f8f05f52cea220369235c80a84019d1f995 Mon Sep 17 00:00:00 2001 From: Bob Kukura Date: Mon, 10 Sep 2012 00:59:24 -0400 Subject: [PATCH] Support enable_tunneling openvswitch configuration variable Adds support for setting the new openvswitch configuration variable added in https://review.openstack.org/#/c/12686/. Change-Id: Ic599de0fbdc922160580189b94c666a597abe182 --- stack.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 687e5bf253..6d7a21e62a 100755 --- a/stack.sh +++ b/stack.sh @@ -1196,6 +1196,12 @@ if is_service_enabled quantum; then # Example: LB_PHYSICAL_INTERFACE=eth1 LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-} + # With the openvswitch plugin, set to True in localrc to enable + # provider GRE tunnels when ENABLE_TENANT_TUNNELS is False. + # + # Example: OVS_ENABLE_TUNNELING=True + OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS} + # Put config files in ``/etc/quantum`` for everyone to find if [[ ! -d /etc/quantum ]]; then sudo mkdir -p /etc/quantum @@ -1272,6 +1278,11 @@ if is_service_enabled q-svc; then if [[ "$OVS_VLAN_RANGES" != "" ]]; then iniset /$Q_PLUGIN_CONF_FILE OVS network_vlan_ranges $OVS_VLAN_RANGES fi + + # Enable tunnel networks if selected + if [[ $OVS_ENABLE_TUNNELING = "True" ]]; then + iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True + fi elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then iniset /$Q_PLUGIN_CONF_FILE VLANS tenant_network_type vlan @@ -1302,7 +1313,7 @@ if is_service_enabled q-agt; then quantum_setup_ovs_bridge $OVS_BRIDGE # Setup agent for tunneling - if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then + if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then # Verify tunnels are supported # REVISIT - also check kernel module support for GRE and patch ports OVS_VERSION=`ovs-vsctl --version | head -n 1 | awk '{print $4;}'` @@ -1311,6 +1322,7 @@ if is_service_enabled q-agt; then echo "OVS 1.4+ is required for tunneling between multiple hosts." exit 1 fi + iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True iniset /$Q_PLUGIN_CONF_FILE OVS local_ip $HOST_IP fi