Skip to content

Commit b320e20

Browse files
fix(lgtm-datamesh): smoke-observability binds Cockpit's port on Fedora
The smoke port-forwards Prometheus to local 9090 — but Fedora (the verified platform) ships Cockpit listening on host 9090. kubectl port-forward fails to bind (silenced by >/dev/null), the queries hit Cockpit instead of Prometheus, and the smoke reports a false FAIL on a perfectly healthy stack. Grafana's local 3000 has the same class of risk from dev servers. Default to 19090/13000, make both env-overridable (PROM_PORT/GRAF_PORT), and add -f to the two readiness probes so a port squatter answering 404 can't satisfy them. Verified live: false-failed on 9090 (Cockpit), passes on the new ports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4f73dbe commit b320e20

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎examples/lgtm-datamesh/demos/smoke-observability.sh‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
set -uo pipefail
1616

1717
NS="observability"
18-
PROM_PORT="9090"
19-
GRAF_PORT="3000"
18+
# Local port-forward ports. NOT 9090/3000: Fedora ships Cockpit on host 9090
19+
# (the port-forward silently fails to bind and the queries hit Cockpit — a
20+
# false FAIL on the reference platform), and 3000 is a common dev-server port.
21+
# Override per run: PROM_PORT=9091 ./demos/smoke-observability.sh
22+
PROM_PORT="${PROM_PORT:-19090}"
23+
GRAF_PORT="${GRAF_PORT:-13000}"
2024
PROM_PF=""
2125
GRAF_PF=""
2226

@@ -63,7 +67,7 @@ step "Port-forwarding Prometheus ($PROM_PORT → prometheus-server:80)"
6367
kubectl port-forward -n "$NS" svc/prometheus-server "${PROM_PORT}:80" >/dev/null 2>&1 &
6468
PROM_PF=$!
6569
for _ in $(seq 1 15); do
66-
curl -s -o /dev/null --max-time 2 "http://127.0.0.1:${PROM_PORT}/-/ready" && break
70+
curl -sf -o /dev/null --max-time 2 "http://127.0.0.1:${PROM_PORT}/-/ready" && break
6771
sleep 1
6872
done
6973

@@ -94,7 +98,7 @@ step "Port-forwarding Grafana ($GRAF_PORT → grafana:80)"
9498
kubectl port-forward -n "$NS" svc/grafana "${GRAF_PORT}:80" >/dev/null 2>&1 &
9599
GRAF_PF=$!
96100
for _ in $(seq 1 15); do
97-
curl -s -o /dev/null --max-time 2 "http://127.0.0.1:${GRAF_PORT}/api/health" && break
101+
curl -sf -o /dev/null --max-time 2 "http://127.0.0.1:${GRAF_PORT}/api/health" && break
98102
sleep 1
99103
done
100104

0 commit comments

Comments
 (0)