Fix getting IP when there are multiple IPs assigned
Story: 2003851 Task: 26644 Change-Id: I425dac241cbf454d91c644e7d2ef65625f70e01c
This commit is contained in:
parent
7d39af25fd
commit
9b46e06062
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Neutron
|
||||
name: neutron
|
||||
version: 0.3.18
|
||||
version: 0.3.19
|
||||
home: https://docs.openstack.org/neutron/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
|
||||
sources:
|
||||
|
@ -46,7 +46,7 @@ if [ -z "${tunnel_interface}" ] ; then
|
||||
fi
|
||||
|
||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||
LOCAL_IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
LOCAL_IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" 'NR==1 {print $1}')
|
||||
if [ -z "${LOCAL_IP}" ] ; then
|
||||
echo "Var LOCAL_IP is empty"
|
||||
exit 1
|
||||
|
@ -65,7 +65,7 @@ function get_name_by_pci_id {
|
||||
|
||||
function get_ip_address_from_interface {
|
||||
local interface=$1
|
||||
local ip=$(ip -4 -o addr s "${interface}" | awk '{ print $4; exit }' | awk -F '/' '{print $1}')
|
||||
local ip=$(ip -4 -o addr s "${interface}" | awk '{ print $4; exit }' | awk -F '/' 'NR==1 {print $1}')
|
||||
if [ -z "${ip}" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
@ -74,7 +74,7 @@ function get_ip_address_from_interface {
|
||||
|
||||
function get_ip_prefix_from_interface {
|
||||
local interface=$1
|
||||
local prefix=$(ip -4 -o addr s "${interface}" | awk '{ print $4; exit }' | awk -F '/' '{print $2}')
|
||||
local prefix=$(ip -4 -o addr s "${interface}" | awk '{ print $4; exit }' | awk -F '/' 'NR==1 {print $2}')
|
||||
if [ -z "${prefix}" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
@ -60,4 +60,5 @@ neutron:
|
||||
- 0.3.16 Use service tokens
|
||||
- 0.3.17 Add exec probe timeouts
|
||||
- 0.3.18 Improve OVN support
|
||||
- 0.3.19 Fix getting IP for interface when there are multiple IPs assigned
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user