|
...
|
...
|
@@ -1267,9 +1267,19 @@ function _neutron_configure_router_v4 {
|
|
1267
|
1267
|
# This logic is specific to using the l3-agent for layer 3
|
|
1268
|
1268
|
if is_service_enabled q-l3; then
|
|
1269
|
1269
|
# Configure and enable public bridge
|
|
|
1270
|
+ local ext_gw_interface="none"
|
|
1270
|
1271
|
if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
|
1271
|
|
- local ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
|
|
1272
|
+ ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
|
|
1273
|
+ elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
|
|
|
1274
|
+ # Search for the brq device the neutron router and network for $FIXED_RANGE
|
|
|
1275
|
+ # will be using.
|
|
|
1276
|
+ # e.x. brq3592e767-da for NET_ID 3592e767-da66-4bcb-9bec-cdb03cd96102
|
|
|
1277
|
+ ext_gw_interface=brq${EXT_NET_ID:0:11}
|
|
|
1278
|
+ fi
|
|
|
1279
|
+ if [[ "$ext_gw_interface" != "none" ]]; then
|
|
1272
|
1280
|
local cidr_len=${FLOATING_RANGE#*/}
|
|
|
1281
|
+ local testcmd="ip -o link | grep -q $ext_gw_interface"
|
|
|
1282
|
+ test_with_retry "$testcmd" "$ext_gw_interface creation failed"
|
|
1273
|
1283
|
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
|
|
1274
|
1284
|
sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
|
|
1275
|
1285
|
sudo ip link set $ext_gw_interface up
|