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
This commit is contained in:
Bob Kukura 2012-09-10 00:59:24 -04:00
parent c132625d1d
commit fddd8f8f05

View File

@ -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