Merge "Fixes for linux bridge and Q_USE_PROVIDER_NET"
This commit is contained in:
commit
e8b9257c7c
@ -61,6 +61,9 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
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 [[ "$PUBLIC_BRIDGE" != "" ]] && [[ "$PUBLIC_PHYSICAL_NETWORK" != "" ]]; then
|
||||||
|
iniset /$Q_PLUGIN_CONF_FILE linux_bridge bridge_mappings "$PUBLIC_PHYSICAL_NETWORK:$PUBLIC_BRIDGE"
|
||||||
|
fi
|
||||||
if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
|
if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS
|
iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS
|
||||||
fi
|
fi
|
||||||
|
@ -95,8 +95,16 @@ function neutron_plugin_configure_service {
|
|||||||
|
|
||||||
|
|
||||||
# Allow for setup the flat type network
|
# Allow for setup the flat type network
|
||||||
if [[ -z "$Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS" && -n "$PHYSICAL_NETWORK" ]]; then
|
if [[ -z "$Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS" ]]; then
|
||||||
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS="flat_networks=$PHYSICAL_NETWORK"
|
if [[ -n "$PHYSICAL_NETWORK" || -n "$PUBLIC_PHYSICAL_NETWORK" ]]; then
|
||||||
|
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS="flat_networks="
|
||||||
|
if [[ -n "$PHYSICAL_NETWORK" ]]; then
|
||||||
|
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS+="${PHYSICAL_NETWORK},"
|
||||||
|
fi
|
||||||
|
if [[ -n "$PUBLIC_PHYSICAL_NETWORK" ]]; then
|
||||||
|
Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS+="${PUBLIC_PHYSICAL_NETWORK},"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# REVISIT(rkukura): Setting firewall_driver here for
|
# REVISIT(rkukura): Setting firewall_driver here for
|
||||||
# neutron.agent.securitygroups_rpc.is_firewall_enabled() which is
|
# neutron.agent.securitygroups_rpc.is_firewall_enabled() which is
|
||||||
|
@ -306,11 +306,16 @@ function _neutron_configure_router_v4 {
|
|||||||
if is_neutron_ovs_base_plugin; then
|
if is_neutron_ovs_base_plugin; then
|
||||||
ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
||||||
elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
|
elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
|
||||||
# Search for the brq device the neutron router and network for $FIXED_RANGE
|
# Get the device the neutron router and network for $FIXED_RANGE
|
||||||
# will be using.
|
# will be using.
|
||||||
|
if [ "$Q_USE_PROVIDERNET_FOR_PUBLIC" = "True" ]; then
|
||||||
|
# in provider nets a bridge mapping uses the public bridge directly
|
||||||
|
ext_gw_interface=$PUBLIC_BRIDGE
|
||||||
|
else
|
||||||
# e.x. brq3592e767-da for NET_ID 3592e767-da66-4bcb-9bec-cdb03cd96102
|
# e.x. brq3592e767-da for NET_ID 3592e767-da66-4bcb-9bec-cdb03cd96102
|
||||||
ext_gw_interface=brq${EXT_NET_ID:0:11}
|
ext_gw_interface=brq${EXT_NET_ID:0:11}
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [[ "$ext_gw_interface" != "none" ]]; then
|
if [[ "$ext_gw_interface" != "none" ]]; then
|
||||||
local cidr_len=${FLOATING_RANGE#*/}
|
local cidr_len=${FLOATING_RANGE#*/}
|
||||||
local testcmd="ip -o link | grep -q $ext_gw_interface"
|
local testcmd="ip -o link | grep -q $ext_gw_interface"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user