mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #21108 from mml/slow-flake
Include some debug output when the API server never appears.
This commit is contained in:
@@ -744,6 +744,18 @@ function check-cluster() {
|
||||
local elapsed=$(($(date +%s) - ${start_time}))
|
||||
if [[ ${elapsed} -gt ${KUBE_CLUSTER_INITIALIZATION_TIMEOUT} ]]; then
|
||||
echo -e "${color_red}Cluster failed to initialize within ${KUBE_CLUSTER_INITIALIZATION_TIMEOUT} seconds.${color_norm}" >&2
|
||||
if [[ ${KUBE_TEST_DEBUG-} =~ ^[yY]$ ]]; then
|
||||
local tmp_log="$(mktemp)"
|
||||
local file
|
||||
for file in /var/log/startupscript.log /var/log/kube-apiserver.log; do
|
||||
echo "${MASTER_NAME}:${file} contents:"
|
||||
if gcloud compute copy-files --project "${PROJECT}" \
|
||||
--zone "${ZONE}" "${MASTER_NAME}:${file}" "${tmp_log}"; then
|
||||
cat "${tmp_log}"
|
||||
fi
|
||||
done
|
||||
rm -f "${tmp_log}"
|
||||
fi
|
||||
exit 2
|
||||
fi
|
||||
printf "."
|
||||
|
||||
Reference in New Issue
Block a user