Merge "Neutron: fix reg exp for finding default tunneling interface"

This commit is contained in:
Jenkins 2017-09-12 15:14:23 +00:00 committed by Gerrit Code Review
commit a81891a2d9
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ tunnel_interface="{{- .Values.network.interface.tunnel -}}"
if [ -z "${tunnel_interface}" ] ; then
# search for interface with default routing
# If there is not default gateway, exit
tunnel_interface=$(ip r | grep default | grep -oP '(?<=dev ).*') || exit 1
tunnel_interface=$(ip route list 0/0 | grep -oP '(?<=dev\s)\w+') || exit 1
fi
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null

View File

@ -32,7 +32,7 @@ timeout 3m neutron-sanity-check --config-file /etc/neutron/neutron.conf --config
tunnel_interface="{{- .Values.network.interface.tunnel -}}"
if [ -z "${tunnel_interface}" ] ; then
# search for interface with default routing
tunnel_interface=$(ip route | awk '/^default/ { print $5 }' | head -1 )
tunnel_interface=$(ip route list 0/0 | grep -oP '(?<=dev\s)\w+')
fi
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null