@@ -568,8 +568,8 @@ Helm-Deploy Current dCache build:
568568 --set image.tag=${tag}
569569 --set dcache.hsm.enabled=true
570570 --set dcache.qos.enabled=true
571- --set "dcache .env.JACOCO_OPTS=output=tcpserver\,address=0.0.0.0\,port=6300\,dumponexit=true"
572- --set "dcache.layoutExtraPre=-javaagent:/opt/dcache/share/classes/jacocoagent.jar=\$(JACOCO_OPTS)"
571+ --set global .env[0].name=JACOCO_OPTS \
572+ --set global.env[0].value="output=tcpserver,address=*,port=6300,append=false" \
573573 --values .ci/custom-helm-config.yaml
574574
575575Helm-Deploy Latest dCache Golden Release :
@@ -592,53 +592,43 @@ Helm-Deploy Latest dCache Golden Release:
592592Extract Coverage :
593593 stage : testenv_post
594594 extends : .kubernetes_image
595- dependencies :
596- - get_jacoco_cli # Explicitly pull the CLI tool artifact
597- when : always # Collect coverage even if tests fail
595+ needs :
596+ - job : get_jacoco_cli
597+ artifacts : true
598+ - job : " Deploy dcache" # ensure deployment is complete
598599 script :
599600 - mkdir -p integration-results
600601 - JACOCO_CLI_PATH="jacoco-${JACOCO_VERSION}/lib/jacococli.jar"
601602 - PODS=$(kubectl -n $K8S_NAMESPACE get pods -l app.kubernetes.io/instance=store -o jsonpath='{.items[*].metadata.name}')
603+
604+ # First verify JaCoCo is actually running
602605 - |
603606 for POD in $PODS; do
604- echo "========================================================="
605- echo "DIAGNOSTIC REPORT FOR POD: $POD"
606- echo "========================================================="
607-
608- echo "--- 1. FILE SYSTEM SEARCH (Finding dcache.conf and layouts) ---"
609- kubectl -n $K8S_NAMESPACE exec $POD -- find /etc/dcache /opt/dcache -name "*.conf" -o -name "layout" || true
610-
611- echo "--- 2. CHECKING EFFECTIVE LAYOUT ---"
612- # The ConfigMap suggests the layout name is 'dcache-k8s-door' or 'dcache-k8s'
613- kubectl -n $K8S_NAMESPACE exec $POD -- cat /etc/dcache/layouts/dcache-k8s.conf 2>/dev/null || \
614- kubectl -n $K8S_NAMESPACE exec $POD -- cat /etc/dcache/dcache.conf 2>/dev/null || echo "Standard config files not found"
615-
616- echo "--- 3. JVM PROCESS ANALYSIS ---"
617- # This shows exactly what flags were used to start Java
618- kubectl -n $K8S_NAMESPACE exec $POD -- ps -ef | grep java | grep -v grep || echo "Java not running"
619-
620- echo "--- 4. DCACHE PROPERTY INSPECTION ---"
621- # Query dCache directly for what it thinks the java options are
622- kubectl -n $K8S_NAMESPACE exec $POD -- /opt/dcache/bin/dcache lib property dcache.java.options.extra || true
623-
624- echo "--- 5. NETWORK STATUS ---"
625- # Check if the port 6300 is actually listening inside the pod
626- kubectl -n $K8S_NAMESPACE exec $POD -- ss -tln | grep 6300 || echo "Port 6300 is CLOSED"
627-
628- echo "--- 6. TRIGGERING DUMP (If Possible) ---"
629- kubectl -n $K8S_NAMESPACE cp "$JACOCO_CLI_PATH" "${POD}:/tmp/jacococli.jar"
630- POD_IP=$(kubectl -n $K8S_NAMESPACE get pod $POD -o jsonpath='{.status.podIP}')
631- if kubectl -n $K8S_NAMESPACE exec $POD -- /usr/bin/java -jar /tmp/jacococli.jar dump --address $POD_IP --port 6300 --destfile /tmp/jacoco-it.exec; then
632- echo "[SUCCESS] Coverage dumped."
633- kubectl -n $K8S_NAMESPACE cp "${POD}:/opt/dcache/var/log/jacoco-it.exec" "./integration-results/${POD}.exec"
634- else
635- echo "[FAILURE] Could not connect to JaCoCo agent on $POD"
636- fi
607+ echo "Checking JaCoCo on $POD..."
608+ kubectl -n $K8S_NAMESPACE exec $POD -- env | grep JACOCO || echo "WARNING: JACOCO_OPTS not set on $POD"
609+ kubectl -n $K8S_NAMESPACE exec $POD -- ps -ef | grep jacocoagent || echo "WARNING: JaCoCo agent not running on $POD"
610+ done
611+
612+ # Then collect coverage
613+ - |
614+ for POD in $PODS; do
615+ echo "Collecting coverage from $POD..."
616+ kubectl -n $K8S_NAMESPACE cp "$JACOCO_CLI_PATH" "${POD}:/tmp/jacococli.jar"
617+ POD_IP=$(kubectl -n $K8S_NAMESPACE get pod $POD -o jsonpath='{.status.podIP}')
618+
619+ if kubectl -n $K8S_NAMESPACE exec $POD -- \
620+ /usr/bin/java -jar /tmp/jacococli.jar dump \
621+ --address $POD_IP --port 6300 --destfile /tmp/jacoco-it.exec; then
622+ echo "✓ Success dumping coverage from $POD"
623+ kubectl -n $K8S_NAMESPACE cp "${POD}:/tmp/jacoco-it.exec" "./integration-results/${POD}.exec"
624+ else
625+ echo "✗ Failed to dump coverage from $POD"
626+ fi
637627 done
638628 artifacts :
639- paths :
640- - integration-results/*.exec
641- when : always
629+ paths :
630+ - integration-results/*.exec
631+ when : always
642632
643633Grid EL9 WN tests :
644634 stage : testing
0 commit comments