diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-03-23 12:57:08 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-03-23 12:57:08 +0100 |
commit | 5f7b64b22b44e0866842b778760cf5ccfc23201b (patch) | |
tree | f14754e50a2dd61e21212951a3007a1d27e086de /plans | |
parent | 940b6d936da7a3be6cfd5bd903ef40c6da9592ae (diff) |
Fix getting local ip address in CSIT setup scripts
Assumption that last field in routing entry is the
local src address is no longer valide in the latest
iproute2 releases as it adds UID information.
The correct way is to get the 7th field, not the last.
Change-Id: Id2289fbf9b916ccab3ac7949d4f8118ef0571935
Issue-ID: INT-1497
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'plans')
-rwxr-xr-x | plans/dcaegen2-collectors-restconf/testsuites/setup.sh | 2 | ||||
-rwxr-xr-x | plans/dcaegen2/testsuites/setup.sh | 2 | ||||
-rw-r--r-- | plans/portal-sdk/testsuite/setup.sh | 4 | ||||
-rw-r--r-- | plans/portal/testsuite/setup.sh | 4 | ||||
-rw-r--r-- | plans/usecases/5G-bulkpm/setup.sh | 2 | ||||
-rw-r--r-- | plans/vfc-nfvo-wfengine/sanity-check/setup.sh | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/plans/dcaegen2-collectors-restconf/testsuites/setup.sh b/plans/dcaegen2-collectors-restconf/testsuites/setup.sh index 2b018172..ad96796a 100755 --- a/plans/dcaegen2-collectors-restconf/testsuites/setup.sh +++ b/plans/dcaegen2-collectors-restconf/testsuites/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash #get current host IP addres -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') CONTAINER_NAME=rcc RCC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:latest echo RCC_IMAGE=${RCC_IMAGE} diff --git a/plans/dcaegen2/testsuites/setup.sh b/plans/dcaegen2/testsuites/setup.sh index 781e205f..26585c20 100755 --- a/plans/dcaegen2/testsuites/setup.sh +++ b/plans/dcaegen2/testsuites/setup.sh @@ -19,7 +19,7 @@ #get current host IP addres -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest diff --git a/plans/portal-sdk/testsuite/setup.sh b/plans/portal-sdk/testsuite/setup.sh index 6510311c..c75e0788 100644 --- a/plans/portal-sdk/testsuite/setup.sh +++ b/plans/portal-sdk/testsuite/setup.sh @@ -11,7 +11,7 @@ XVFBPID=$! # Get pid of this spawned process to make sure we kill the correct process later #Get current IP of VM -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') export HOST_IP=${HOST_IP} @@ -172,7 +172,7 @@ fi #Get current IP of VM -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') export HOST_IP=${HOST_IP} #docker logs deliveries_portal-db_1 diff --git a/plans/portal/testsuite/setup.sh b/plans/portal/testsuite/setup.sh index 76cf5f37..89320074 100644 --- a/plans/portal/testsuite/setup.sh +++ b/plans/portal/testsuite/setup.sh @@ -11,7 +11,7 @@ XVFBPID=$! # Get pid of this spawned process to make sure we kill the correct process later #Get current IP of VM -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') export HOST_IP=${HOST_IP} @@ -172,7 +172,7 @@ fi #Get current IP of VM -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') export HOST_IP=${HOST_IP} docker logs deliveries_portal-db_1 diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index 9fbd2ef9..e0d7b801 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -71,7 +71,7 @@ docker kill cbs sleep 10 CONSUL_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' consul ) sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_IP'/' docker-compose.yml -HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP) sed -i -e '/DMAAPHOST:/ s/:.*/: '$DMAAP_MR_IP'/' docker-compose.yml MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb ) diff --git a/plans/vfc-nfvo-wfengine/sanity-check/setup.sh b/plans/vfc-nfvo-wfengine/sanity-check/setup.sh index e7c755fa..387ccf87 100644 --- a/plans/vfc-nfvo-wfengine/sanity-check/setup.sh +++ b/plans/vfc-nfvo-wfengine/sanity-check/setup.sh @@ -49,7 +49,7 @@ IMAGE="wfengine-activiti" IMAGE_ACTIVITI_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" #get current host IP addres -SERVICE_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') +SERVICE_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}') # start wfengine-activiti # docker run -d --name vfc_wfengine_activiti -p 8804:8080 -e SERVICE_IP=$SERVICE_IP -e SERVICE_PORT=8804 -e OPENPALETTE_MSB_IP=${MSB_IAG_IP} -e OPENPALETTE_MSB_PORT=80 ${IMAGE_ACTIVITI_NAME} |