Skip to content

Commit b94c101

Browse files
committed
disable tracing while handling token
Signed-off-by: Akhil Mohan <[email protected]>
1 parent 9df96dc commit b94c101

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

contrib/gce/configure.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ if [ -f "${CONTAINERD_HOME}/${CONTAINERD_ENV_METADATA}" ]; then
104104
source "${CONTAINERD_HOME}/${CONTAINERD_ENV_METADATA}"
105105
fi
106106

107+
set +x
107108
# GCS_BUCKET_TOKEN_METADATA is the metadata key for the GCS bucket token
108109
GCS_BUCKET_TOKEN_METADATA="GCS_BUCKET_TOKEN"
109110
# GCS_BUCKET_TOKEN should have read access to the bucket from which
@@ -112,6 +113,7 @@ GCS_BUCKET_TOKEN=$(fetch_metadata "${GCS_BUCKET_TOKEN_METADATA}")
112113
if [[ -n "${GCS_BUCKET_TOKEN}" ]]; then
113114
HEADERS=(-H "Authorization: Bearer ${GCS_BUCKET_TOKEN}")
114115
fi
116+
set -x
115117

116118
# CONTAINERD_PKG_PREFIX is the prefix of the cri-containerd tarball name.
117119
# By default use the release tarball with cni built in.
@@ -142,7 +144,7 @@ else
142144
| jq -r .tag_name \
143145
| sed "s:v::g")
144146
else
145-
version=$(curl -X GET "${HEADERS[@]}" -f --ipv4 --retry 6 --retry-delay 3 --silent --show-error \
147+
version=$(set +x; curl -X GET "${HEADERS[@]}" -f --ipv4 --retry 6 --retry-delay 3 --silent --show-error \
146148
https://storage.googleapis.com/${deploy_path}/latest)
147149
fi
148150
fi
@@ -174,7 +176,8 @@ else
174176
echo "${TARBALL_GCS_NAME} is preloaded"
175177
else
176178
# Download and untar the release tar ball.
177-
curl -X GET "${HEADERS[@]}" -f --ipv4 -Lo "${TARBALL}" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 "${TARBALL_GCS_PATH}"
179+
$(set +x; curl -X GET "${HEADERS[@]}" -f --ipv4 -Lo "${TARBALL}" --connect-timeout 20 --max-time 300 --retry 6 \
180+
--retry-delay 10 "${TARBALL_GCS_PATH}")
178181
tar xvf "${TARBALL}"
179182
rm -f "${TARBALL}"
180183
fi

0 commit comments

Comments
 (0)