Unverified Commit 07256f04 authored by Pavithra Vijayakrishnan's avatar Pavithra Vijayakrishnan Committed by GitHub
Browse files

ci: Improve debug for the vcluster step failure (#7554)


Signed-off-by: default avatarpvijayakrish <pvijayakrish@nvidia.com>
parent 28cfdcc7
...@@ -208,14 +208,28 @@ runs: ...@@ -208,14 +208,28 @@ runs:
echo "### VCLUSTER OPERATOR DEPLOYMENT FAILED" | tee -a $GITHUB_STEP_SUMMARY echo "### VCLUSTER OPERATOR DEPLOYMENT FAILED" | tee -a $GITHUB_STEP_SUMMARY
echo "::group::Pod status (vCluster)"
kubectl --kubeconfig=${VKUBECONFIG} get pods -A -o wide 2>&1 || true
echo "::endgroup::"
echo "::group::Pod status (host namespace)" echo "::group::Pod status (host namespace)"
kubectl get pods -n ${NAMESPACE} -o wide 2>&1 || true kubectl get pods -n ${NAMESPACE} -o wide 2>&1 || true
echo "::endgroup::" echo "::endgroup::"
echo "::group::Events (host namespace)"
kubectl get events -n ${NAMESPACE} --sort-by='.lastTimestamp' 2>&1 || true
echo "::endgroup::"
echo "::group::Describe pods (host namespace)"
kubectl describe pods -n ${NAMESPACE} 2>&1 || true
echo "::endgroup::"
if [ ! -f "${VKUBECONFIG}" ]; then
echo "::warning::vCluster kubeconfig not found — vCluster never connected successfully"
echo "- **vCluster kubeconfig missing** — connect-vcluster step failed before writing .kubeconfig-vcluster" >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "::group::Pod status (vCluster)"
kubectl --kubeconfig=${VKUBECONFIG} get pods -A -o wide 2>&1 || true
echo "::endgroup::"
NOT_READY=$(kubectl --kubeconfig=${VKUBECONFIG} get pods -n default --no-headers 2>/dev/null \ NOT_READY=$(kubectl --kubeconfig=${VKUBECONFIG} get pods -n default --no-headers 2>/dev/null \
| awk -F'[/ ]+' '$2 != $3 || ($4 != "Running" && $4 != "Completed")') | awk -F'[/ ]+' '$2 != $3 || ($4 != "Running" && $4 != "Completed")')
if [ -n "$NOT_READY" ]; then if [ -n "$NOT_READY" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment