mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-18 05:36:24 +00:00
tests: dump kata-deploy pod describe+logs on install timeout
When kubectl wait times out the pod never reached Ready, so the existing log collection (which runs after wait succeeds) produces "-- No entries --" with zero useful information. Capture kubectl describe and kubectl logs (including previous container) immediately on timeout so the next CI run shows exactly why the pod is stuck (ImagePullBackOff, OOMKilled, probe failures, containerd restart hang, etc.). Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Assisted-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1065,7 +1065,16 @@ VERIFICATION_POD_EOF
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
kubectl -n kube-system wait pod -l name=kata-deploy --for=condition=Ready --timeout="${KATA_DEPLOY_WAIT_TIMEOUT}s"
|
||||
if ! kubectl -n kube-system wait pod -l name=kata-deploy --for=condition=Ready --timeout="${KATA_DEPLOY_WAIT_TIMEOUT}s"; then
|
||||
echo "::group::kata-deploy pod describe (install timed out)"
|
||||
kubectl -n kube-system describe pod -l name=kata-deploy || true
|
||||
echo "::endgroup::"
|
||||
echo "::group::kata-deploy logs (install timed out)"
|
||||
kubectl -n kube-system logs -l name=kata-deploy --all-containers --previous 2>/dev/null || true
|
||||
kubectl -n kube-system logs -l name=kata-deploy --all-containers 2>/dev/null || true
|
||||
echo "::endgroup::"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "::group::kata-deploy logs"
|
||||
kubectl_retry -n kube-system logs -l name=kata-deploy
|
||||
|
||||
Reference in New Issue
Block a user