diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 436b0e3364..791ff18b10 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -233,7 +233,7 @@ OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-br-ex} # # Example: ``LB_PHYSICAL_INTERFACE=eth1`` if [[ $Q_AGENT == "linuxbridge" && -z ${LB_PHYSICAL_INTERFACE} ]]; then - default_route_dev=$(ip route | grep ^default | awk '{print $5}') + default_route_dev=$( (ip route; ip -6 route) | grep ^default | head -n 1 | awk '{print $5}') die_if_not_set $LINENO default_route_dev "Failure retrieving default route device" LB_PHYSICAL_INTERFACE=$default_route_dev fi diff --git a/lib/neutron_plugins/services/l3 b/lib/neutron_plugins/services/l3 index 69536bbe58..75a3567096 100644 --- a/lib/neutron_plugins/services/l3 +++ b/lib/neutron_plugins/services/l3 @@ -101,7 +101,6 @@ SUBNETPOOL_SIZE_V4=${SUBNETPOOL_SIZE_V4:-26} SUBNETPOOL_SIZE_V6=${SUBNETPOOL_SIZE_V6:-64} default_v4_route_devs=$(ip -4 route | grep ^default | awk '{print $5}') -die_if_not_set $LINENO default_v4_route_devs "Failure retrieving default IPv4 route devices" default_v6_route_devs=$(ip -6 route list match default table all | grep via | awk '{print $5}')