aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorJuraj Linkeš <juraj.linkes@pantheon.tech>2020-10-09 10:34:08 +0200
committerJuraj Linke? <juraj.linkes@pantheon.tech>2020-10-14 11:42:43 +0000
commit9c0f0ca1d9a60649cc46980d447c5d567c63cf2d (patch)
treeaf328519f50c53322742a2aa42ab106b6ca74eec /resources/libraries
parentaad45d97721bb9b054681914c92f125123fba05a (diff)
vpp_device: fix shim hostname
Replace the hacky grep of /etc/resolv.conf with default docker gateway IP. Change-Id: Iec3a4658826f2ba871acb14d511e9c79a1273290 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/bash/function/common.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index e1bf88db9d..2b1a7f5128 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -42,7 +42,6 @@ function activate_docker_topology () {
source "${BASH_FUNCTION_DIR}/device.sh" || {
die "Source failed!"
}
-
device_image="$(< ${CSIT_DIR}/${IMAGE_VER_FILE})"
case_text="${NODENESS}_${FLAVOR}"
case "${case_text}" in
@@ -50,8 +49,9 @@ function activate_docker_topology () {
# We execute reservation over csit-shim-dcr (ssh) which runs sourced
# script's functions. Env variables are read from ssh output
# back to localhost for further processing.
- hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die
- ssh="ssh root@${hostname} -p 6022"
+ # Shim and Jenkins executor are in the same network on the same host
+ # Connect to docker's default gateway IP and shim's exposed port
+ ssh="ssh root@172.17.0.1 -p 6022"
run="activate_wrapper ${NODENESS} ${FLAVOR} ${device_image}"
# The "declare -f" output is long and boring.
set +x
@@ -333,8 +333,7 @@ function deactivate_docker_topology () {
case_text="${NODENESS}_${FLAVOR}"
case "${case_text}" in
"1n_skx" | "1n_tx2")
- hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die
- ssh="ssh root@${hostname} -p 6022"
+ ssh="ssh root@172.17.0.1 -p 6022"
env_vars=$(env | grep CSIT_ | tr '\n' ' ' ) || die
# The "declare -f" output is long and boring.
set +x