Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 5936c80

Browse files
committed
test: assist with debugging QEMU startup
When kubeadm fails, the error is followed by lots of diagnostics. That's good for the CI, but can hide the actual error. Some extra message at the end helps. When running interactively, pausing the shutdown gives an opportunity to debug without having to start again with a modified script.
1 parent 9b69124 commit 5936c80

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/setup-kubernetes.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ sudo kubeadm init $kubeadm_args $kubeadm_args_init || (
252252
# Dump some information that might explain the failure.
253253
sudo systemctl status docker crio containerd kubelet
254254
sudo journalctl -xe -u docker -u crio -u containerd -u kubelet
255+
echo "ERROR: kubeadm init failed, see above."
255256
exit 1
256257
)
257258
mkdir -p $HOME/.kube

test/start-kubernetes.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,12 @@ function cleanup() (
523523
echo "Docker log for $name:"
524524
docker logs $name | sed -e "s/^/$name: /"
525525
fi
526+
527+
if [ -t 0 ]; then
528+
echo "Press RETURN to clean up."
529+
read input
530+
fi
531+
526532
for vm in $(govm list -f '{{select (filterRegexp . "Name" "^'$(node_filter ${NODES[@]})'$") "Name"}}'); do
527533
govm remove "$vm"
528534
done

0 commit comments

Comments
 (0)