Fix incorrect comparisions
The files changed in this commit had incorrect bash syntax in that they were assigning variables (=) instead of checking if they were equal (==). The incorrect checks were preventing the configuration of VLANs with the Neutron ML2 plugin. Change-Id: I4b54bb5c69cc836c22900bd7a966197e9c616076
This commit is contained in:
parent
ceda7cfe65
commit
bd0855056b
@ -15,7 +15,7 @@ function neutron_plugin_configure_common {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_service {
|
function neutron_plugin_configure_service {
|
||||||
if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
if [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan
|
iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan
|
||||||
else
|
else
|
||||||
echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
|
echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
|
||||||
@ -23,7 +23,7 @@ function neutron_plugin_configure_service {
|
|||||||
|
|
||||||
# Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
|
# Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
|
||||||
# for more complex physical network configurations.
|
# for more complex physical network configurations.
|
||||||
if [[ "$LB_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
if [[ "$LB_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||||
LB_VLAN_RANGES=$PHYSICAL_NETWORK
|
LB_VLAN_RANGES=$PHYSICAL_NETWORK
|
||||||
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
||||||
LB_VLAN_RANGES=$LB_VLAN_RANGES:$TENANT_VLAN_RANGE
|
LB_VLAN_RANGES=$LB_VLAN_RANGES:$TENANT_VLAN_RANGE
|
||||||
|
@ -35,7 +35,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
# Setup physical network interface mappings. Override
|
# Setup physical network interface mappings. Override
|
||||||
# ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
|
# ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
|
||||||
# complex physical network configurations.
|
# complex physical network configurations.
|
||||||
if [[ "$LB_INTERFACE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
|
if [[ "$LB_INTERFACE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
|
||||||
LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
|
LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
|
||||||
fi
|
fi
|
||||||
if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
|
if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
|
||||||
|
@ -11,7 +11,7 @@ Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-}
|
|||||||
# This has to be set here since the agent will set this in the config file
|
# This has to be set here since the agent will set this in the config file
|
||||||
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
||||||
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||||
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
|
||||||
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre)
|
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -60,12 +60,12 @@ function neutron_plugin_configure_common {
|
|||||||
function neutron_plugin_configure_service {
|
function neutron_plugin_configure_service {
|
||||||
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
||||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
Q_SRV_EXTRA_OPTS+=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||||
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
|
||||||
# This assumes you want a simple configuration, and will overwrite
|
# This assumes you want a simple configuration, and will overwrite
|
||||||
# Q_SRV_EXTRA_OPTS if set in addition to ENABLE_TENANT_TUNNELS.
|
# Q_SRV_EXTRA_OPTS if set in addition to ENABLE_TENANT_TUNNELS.
|
||||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=gre)
|
Q_SRV_EXTRA_OPTS+=(tenant_network_types=gre)
|
||||||
Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=(tunnel_id_ranges=$TENANT_TUNNEL_RANGES)
|
Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=(tunnel_id_ranges=$TENANT_TUNNEL_RANGES)
|
||||||
elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
elif [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
|
||||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=vlan)
|
Q_SRV_EXTRA_OPTS+=(tenant_network_types=vlan)
|
||||||
else
|
else
|
||||||
echo "WARNING - The ml2 plugin is using local tenant networks, with no connectivity between hosts."
|
echo "WARNING - The ml2 plugin is using local tenant networks, with no connectivity between hosts."
|
||||||
@ -74,7 +74,7 @@ function neutron_plugin_configure_service {
|
|||||||
# Allow for overrding VLAN configuration (for example, to configure provider
|
# Allow for overrding VLAN configuration (for example, to configure provider
|
||||||
# VLANs) by first checking if Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS is set.
|
# VLANs) by first checking if Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS is set.
|
||||||
if [ "$Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS" == "" ]; then
|
if [ "$Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS" == "" ]; then
|
||||||
if [[ "$ML2_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
if [[ "$ML2_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||||
ML2_VLAN_RANGES=$PHYSICAL_NETWORK
|
ML2_VLAN_RANGES=$PHYSICAL_NETWORK
|
||||||
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
||||||
ML2_VLAN_RANGES=$ML2_VLAN_RANGES:$TENANT_VLAN_RANGE
|
ML2_VLAN_RANGES=$ML2_VLAN_RANGES:$TENANT_VLAN_RANGE
|
||||||
|
@ -46,7 +46,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable tunnel networks if selected
|
# Enable tunnel networks if selected
|
||||||
if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then
|
if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then
|
||||||
# Verify tunnels are supported
|
# Verify tunnels are supported
|
||||||
# REVISIT - also check kernel module support for GRE and patch ports
|
# REVISIT - also check kernel module support for GRE and patch ports
|
||||||
OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"`
|
OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"`
|
||||||
@ -60,7 +60,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
# Setup physical network bridge mappings. Override
|
# Setup physical network bridge mappings. Override
|
||||||
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
|
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
|
||||||
# complex physical network configurations.
|
# complex physical network configurations.
|
||||||
if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
||||||
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
||||||
|
|
||||||
# Configure bridge manually with physical interface as port for multi-node
|
# Configure bridge manually with physical interface as port for multi-node
|
||||||
|
@ -15,10 +15,10 @@ function neutron_plugin_configure_common {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_service {
|
function neutron_plugin_configure_service {
|
||||||
if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
if [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type gre
|
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type gre
|
||||||
iniset /$Q_PLUGIN_CONF_FILE ovs tunnel_id_ranges $TENANT_TUNNEL_RANGES
|
iniset /$Q_PLUGIN_CONF_FILE ovs tunnel_id_ranges $TENANT_TUNNEL_RANGES
|
||||||
elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
elif [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type vlan
|
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type vlan
|
||||||
else
|
else
|
||||||
echo "WARNING - The openvswitch plugin is using local tenant networks, with no connectivity between hosts."
|
echo "WARNING - The openvswitch plugin is using local tenant networks, with no connectivity between hosts."
|
||||||
@ -26,7 +26,7 @@ function neutron_plugin_configure_service {
|
|||||||
|
|
||||||
# Override ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc``
|
# Override ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc``
|
||||||
# for more complex physical network configurations.
|
# for more complex physical network configurations.
|
||||||
if [[ "$OVS_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
if [[ "$OVS_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||||
OVS_VLAN_RANGES=$PHYSICAL_NETWORK
|
OVS_VLAN_RANGES=$PHYSICAL_NETWORK
|
||||||
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
||||||
OVS_VLAN_RANGES=$OVS_VLAN_RANGES:$TENANT_VLAN_RANGE
|
OVS_VLAN_RANGES=$OVS_VLAN_RANGES:$TENANT_VLAN_RANGE
|
||||||
@ -37,7 +37,7 @@ function neutron_plugin_configure_service {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable tunnel networks if selected
|
# Enable tunnel networks if selected
|
||||||
if [[ $OVS_ENABLE_TUNNELING = "True" ]]; then
|
if [[ $OVS_ENABLE_TUNNELING == "True" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
|
iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base
|
|||||||
|
|
||||||
function neutron_plugin_create_nova_conf {
|
function neutron_plugin_create_nova_conf {
|
||||||
_neutron_ovs_base_configure_nova_vif_driver
|
_neutron_ovs_base_configure_nova_vif_driver
|
||||||
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||||
iniset $NOVA_CONF xenserver vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
|
iniset $NOVA_CONF xenserver vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
|
||||||
iniset $NOVA_CONF xenserver ovs_integration_bridge $XEN_INTEGRATION_BRIDGE
|
iniset $NOVA_CONF xenserver ovs_integration_bridge $XEN_INTEGRATION_BRIDGE
|
||||||
# Disable nova's firewall so that it does not conflict with neutron
|
# Disable nova's firewall so that it does not conflict with neutron
|
||||||
@ -40,7 +40,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
_neutron_ovs_base_configure_firewall_driver
|
_neutron_ovs_base_configure_firewall_driver
|
||||||
|
|
||||||
# Setup agent for tunneling
|
# Setup agent for tunneling
|
||||||
if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then
|
if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then
|
||||||
# Verify tunnels are supported
|
# Verify tunnels are supported
|
||||||
# REVISIT - also check kernel module support for GRE and patch ports
|
# REVISIT - also check kernel module support for GRE and patch ports
|
||||||
OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"`
|
OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"`
|
||||||
@ -54,7 +54,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
# Setup physical network bridge mappings. Override
|
# Setup physical network bridge mappings. Override
|
||||||
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
|
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
|
||||||
# complex physical network configurations.
|
# complex physical network configurations.
|
||||||
if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
||||||
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
||||||
|
|
||||||
# Configure bridge manually with physical interface as port for multi-node
|
# Configure bridge manually with physical interface as port for multi-node
|
||||||
@ -65,7 +65,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
fi
|
fi
|
||||||
AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent"
|
AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent"
|
||||||
|
|
||||||
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||||
# Make a copy of our config for domU
|
# Make a copy of our config for domU
|
||||||
sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domu"
|
sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domu"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user