Fixes for Linux Bridge in the L3 agent
Prior to this patch, the logic for configuring the interface used for the L3 agent was OVS specific. This patch introduces code to correctly identify the brq device that is used for the L3 agent when using the Linux Bridge mechanism driver. Change-Id: I1a36cad0fb790aaa37417a1176576293e4f2c87f Co-Authored-By: Jens Rosenboom <j.rosenboom@x-ion.de>
This commit is contained in:
parent
442e4e9625
commit
71947d5fd0
@ -1267,9 +1267,19 @@ function _neutron_configure_router_v4 {
|
|||||||
# This logic is specific to using the l3-agent for layer 3
|
# This logic is specific to using the l3-agent for layer 3
|
||||||
if is_service_enabled q-l3; then
|
if is_service_enabled q-l3; then
|
||||||
# Configure and enable public bridge
|
# Configure and enable public bridge
|
||||||
|
local ext_gw_interface="none"
|
||||||
if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
||||||
local ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
||||||
|
elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
|
||||||
|
# Search for the brq device the neutron router and network for $FIXED_RANGE
|
||||||
|
# will be using.
|
||||||
|
# e.x. brq3592e767-da for NET_ID 3592e767-da66-4bcb-9bec-cdb03cd96102
|
||||||
|
ext_gw_interface=brq${EXT_NET_ID:0:11}
|
||||||
|
fi
|
||||||
|
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"
|
||||||
|
test_with_retry "$testcmd" "$ext_gw_interface creation failed"
|
||||||
if [[ $(ip addr show dev $ext_gw_interface | grep -c $ext_gw_ip) == 0 && ( $Q_USE_PROVIDERNET_FOR_PUBLIC == "False" || $Q_USE_PUBLIC_VETH == "True" ) ]]; then
|
if [[ $(ip addr show dev $ext_gw_interface | grep -c $ext_gw_ip) == 0 && ( $Q_USE_PROVIDERNET_FOR_PUBLIC == "False" || $Q_USE_PUBLIC_VETH == "True" ) ]]; then
|
||||||
sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
|
sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
|
||||||
sudo ip link set $ext_gw_interface up
|
sudo ip link set $ext_gw_interface up
|
||||||
|
Loading…
Reference in New Issue
Block a user