@@ -641,6 +641,22 @@ Helm-Deploy Latest dCache Golden Release:
641641 script :
642642 - helm repo add dcache ${DCACHE_HELM_REPO}
643643 - helm repo update
644+ # 1. Start a background loop to log pending pods/events if helm gets stuck
645+ - |
646+ echo "Starting real-time background debugger..."
647+ (
648+ while true; do
649+ sleep 60
650+ echo "--- [Background Debugger Tick] Checking for non-ready components ---"
651+ kubectl -n ${K8S_NAMESPACE} get pods -o wide
652+ echo "--- [Background Debugger Tick] Pending/Failed Pod Conditions ---"
653+ kubectl -n ${K8S_NAMESPACE} describe pods -l app.kubernetes.io/instance=old-store | grep -A 10 -B 2 -E "Status:|Reason:|Message:|Events:" || true
654+ done
655+ ) &
656+ DEBUG_PID=$!
657+
658+ # 2. Run the helm upgrade command
659+ - echo "=== DEPLOYING GOLDEN RELEASE ==="
644660 - >
645661 helm -n ${K8S_NAMESPACE} upgrade --install old-store dcache/dcache
646662 --wait
@@ -649,7 +665,32 @@ Helm-Deploy Latest dCache Golden Release:
649665 --set image.repository=${CI_PROJECT_PATH}
650666 --set image.tag=${DCACHE_COMPATIBILITY_VERSION}
651667 --set "dcache.pools={d,f}"
652- --set dcache.door.enabled=false
668+ --set dcache.door.enabled=false;
669+ HELM_EXIT_CODE=$?
670+
671+ # 3. Kill the background debugger loop
672+ - kill $DEBUG_PID || true
673+
674+ # 4. If helm failed, perform an immediate diagnostic dump before exiting
675+ - |
676+ if [ $HELM_EXIT_CODE -ne 0 ]; then
677+ echo "========================================================="
678+ echo "HELM DEPLOYMENT FAILED!"
679+ echo "========================================================="
680+ echo "=== FINAL POD STATES ==="
681+ kubectl -n ${K8S_NAMESPACE} get pods -o wide
682+
683+ echo "=== DETAILED DESCRIPTION OF UNREADY POOLS ==="
684+ kubectl -n ${K8S_NAMESPACE} describe statefulset old-store-pool-d || true
685+ kubectl -n ${K8S_NAMESPACE} describe statefulset old-store-pool-f || true
686+ kubectl -n ${K8S_NAMESPACE} describe pods -l app.kubernetes.io/instance=old-store || true
687+
688+ echo "=== RECENT KUBERNETES EVENTS ==="
689+ kubectl -n ${K8S_NAMESPACE} get events --sort-by='.metadata.creationTimestamp' | tail -n 40
690+
691+ exit $HELM_EXIT_CODE
692+ fi
693+ - echo "Deployment successful."
653694
654695Extract Coverage :
655696 stage : testenv_post
0 commit comments