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

Commit

Permalink
test: assist with debugging QEMU startup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pohly committed Aug 5, 2022
1 parent 9b69124 commit 5936c80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/setup-kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ sudo kubeadm init $kubeadm_args $kubeadm_args_init || (
# Dump some information that might explain the failure.
sudo systemctl status docker crio containerd kubelet
sudo journalctl -xe -u docker -u crio -u containerd -u kubelet
echo "ERROR: kubeadm init failed, see above."
exit 1
)
mkdir -p $HOME/.kube
Expand Down
6 changes: 6 additions & 0 deletions test/start-kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ function cleanup() (
echo "Docker log for $name:"
docker logs $name | sed -e "s/^/$name: /"
fi

if [ -t 0 ]; then
echo "Press RETURN to clean up."
read input
fi

for vm in $(govm list -f '{{select (filterRegexp . "Name" "^'$(node_filter ${NODES[@]})'$") "Name"}}'); do
govm remove "$vm"
done
Expand Down

0 comments on commit 5936c80

Please sign in to comment.