[debug-report-fix] - set KUBECONFIG env
When running kubectl command from ssh_cmd, the env variable KUBECONFIG is not visible and so the kubectl commands are failing with below error "The connection to the server localhost:8080 was refused - did you specify the right host or port?" Change-Id: I453f95b745a914aad5c608c5e5f625056e516add
This commit is contained in:
parent
497691fe7d
commit
aca670aa5f
|
@ -17,6 +17,8 @@ set -ex
|
|||
|
||||
source "${GATE_UTILS}"
|
||||
|
||||
export KUBECONFIG="${KUBECONFIG:-/etc/kubernetes/admin/kubeconfig.yaml}"
|
||||
|
||||
ssh_cmd "${GENESIS_NAME}" apt-get install -y jq
|
||||
|
||||
# Copies script and virtmgr private key to genesis VM
|
||||
|
@ -24,7 +26,7 @@ ssh_cmd "${GENESIS_NAME}" mkdir -p /root/airship
|
|||
rsync_cmd "${REPO_ROOT}/tools/multi_nodes_gate/airship_gate/bin/debug-report-lite.sh" "${GENESIS_NAME}:/root/airship/"
|
||||
|
||||
set -o pipefail
|
||||
ssh_cmd "${GENESIS_NAME}" /root/airship/debug-report-lite.sh 2>&1 | tee -a "${LOG_FILE}"
|
||||
ssh_cmd_raw "${GENESIS_NAME}" "KUBECONFIG=${KUBECONFIG} /root/airship/debug-report-lite.sh" 2>&1 | tee -a "${LOG_FILE}"
|
||||
set +o pipefail
|
||||
|
||||
rsync_cmd "${GENESIS_NAME}:/root/debug-${GENESIS_NAME}.tgz" .
|
||||
|
|
Loading…
Reference in New Issue