Merge "Fix getting IP when there are multiple IPs assigned"

This commit is contained in:
Zuul 2023-08-31 19:19:23 +00:00 committed by Gerrit Code Review
commit 2b71ad5dae
4 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Neutron description: OpenStack-Helm Neutron
name: neutron name: neutron
version: 0.3.18 version: 0.3.19
home: https://docs.openstack.org/neutron/latest/ home: https://docs.openstack.org/neutron/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources: sources:

View File

@ -46,7 +46,7 @@ if [ -z "${tunnel_interface}" ] ; then
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
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 if [ -z "${LOCAL_IP}" ] ; then
echo "Var LOCAL_IP is empty" echo "Var LOCAL_IP is empty"
exit 1 exit 1

View File

@ -65,7 +65,7 @@ function get_name_by_pci_id {
function get_ip_address_from_interface { function get_ip_address_from_interface {
local interface=$1 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 if [ -z "${ip}" ] ; then
exit 1 exit 1
fi fi
@ -74,7 +74,7 @@ function get_ip_address_from_interface {
function get_ip_prefix_from_interface { function get_ip_prefix_from_interface {
local interface=$1 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 if [ -z "${prefix}" ] ; then
exit 1 exit 1
fi fi

View File

@ -60,4 +60,5 @@ neutron:
- 0.3.16 Use service tokens - 0.3.16 Use service tokens
- 0.3.17 Add exec probe timeouts - 0.3.17 Add exec probe timeouts
- 0.3.18 Improve OVN support - 0.3.18 Improve OVN support
- 0.3.19 Fix getting IP for interface when there are multiple IPs assigned
... ...