Merge "Neutron: Update tunnel interface loaction logic"
This commit is contained in:
commit
749a13f1ce
@ -54,7 +54,7 @@ tunnel_interface="{{- .Values.network.interface.tunnel -}}"
|
|||||||
if [ -z "${tunnel_interface}" ] ; then
|
if [ -z "${tunnel_interface}" ] ; then
|
||||||
# search for interface with default routing
|
# search for interface with default routing
|
||||||
# If there is not default gateway, exit
|
# If there is not default gateway, exit
|
||||||
tunnel_interface=$(ip route list 0/0 | grep -oP '(?<=dev\s)\w+') || exit 1
|
tunnel_interface=$(ip -4 route list 0/0 | awk -F 'dev' '{ print $2; exit }' | awk '{ print $1 }') || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||||
|
@ -32,7 +32,8 @@ timeout 3m neutron-sanity-check --config-file /etc/neutron/neutron.conf --config
|
|||||||
tunnel_interface="{{- .Values.network.interface.tunnel -}}"
|
tunnel_interface="{{- .Values.network.interface.tunnel -}}"
|
||||||
if [ -z "${tunnel_interface}" ] ; then
|
if [ -z "${tunnel_interface}" ] ; then
|
||||||
# search for interface with default routing
|
# search for interface with default routing
|
||||||
tunnel_interface=$(ip route list 0/0 | grep -oP '(?<=dev\s)\w+')
|
# If there is not default gateway, exit
|
||||||
|
tunnel_interface=$(ip -4 route list 0/0 | awk -F 'dev' '{ print $2; exit }' | awk '{ print $1 }') || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||||
|
Loading…
Reference in New Issue
Block a user