aboutsummaryrefslogtreecommitdiffstats
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 13:16:27 +0000
commit4eb57745268f0625d340a245c6741385fe38c1d0 (patch)
tree9c551b86ffb45d37b2790605b3594dc5602b02d3
parentee23d98ccb95c1fdfc106465c5180b1212827f4e (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>
-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 e89def757a..8e0ee97be1 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