Configure the linux bridge physical interface to use the interface for
the default route on the current host. In the future we should consider
using a dangling interface so that we aren't affecting the host
instances networking but this roughly matches what testing has been
using in the past.
Change-Id: I7859437f97e6cab929e90208fe56f7efd62dfe01
| ... | ... |
@@ -211,13 +211,15 @@ PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-public}
|
| 211 | 211 |
# Example: ``OVS_PHYSICAL_BRIDGE=br-eth1`` |
| 212 | 212 |
OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-br-ex}
|
| 213 | 213 |
|
| 214 |
+default_route_dev=$(ip route | grep ^default | awk '{print $5}')
|
|
| 215 |
+die_if_not_set $LINENO default_route_dev "Failure retrieving default route device" |
|
| 214 | 216 |
# With the linuxbridge agent, if using VLANs for tenant networks, |
| 215 | 217 |
# or if using flat or VLAN provider networks, set in ``localrc`` to |
| 216 | 218 |
# the name of the network interface to use for the physical |
| 217 | 219 |
# network. |
| 218 | 220 |
# |
| 219 | 221 |
# Example: ``LB_PHYSICAL_INTERFACE=eth1`` |
| 220 |
-LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-}
|
|
| 222 |
+LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-$default_route_dev}
|
|
| 221 | 223 |
|
| 222 | 224 |
# When Neutron tunnels are enabled it is needed to specify the |
| 223 | 225 |
# IP address of the end point in the local server. This IP is set |