debug(ci): print job container network info before auto-discovery

Adds Step 0a that prints hostname -I, ip route, and a direct curl to
192.168.1.30:9000. This is to verify whether the runner external (in
network_mode: host) is actually propagating host networking to the job
containers it spawns. Symptom: deploy step fails with 'Failed to
connect to 192.168.1.30 port 9000' even from the external runner.
To be removed once we know.
This commit is contained in:
2026-07-10 11:36:59 +00:00
parent 06ad8edf18
commit dcfb7805cd
+14
View File
@@ -71,6 +71,20 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
echo "--- Step 0a: debug network from inside the job container ---"
echo "hostname: $(hostname)"
echo "hostname -I:"
hostname -I 2>/dev/null || echo "(none)"
echo "ip -4 addr show (eth* only):"
ip -4 addr show 2>/dev/null | grep -E "^[0-9]+:|inet " | head -20
echo "ip route:"
ip route 2>/dev/null
echo "ip route show default:"
ip -4 route show default 2>/dev/null
echo "curl to 192.168.1.30:9000 (5s timeout):"
curl -sS -o /dev/null -w ' HTTP=%{http_code} time=%{time_total}s\n' --max-time 5 "http://192.168.1.30:9000/api/status" 2>&1 || echo " (curl failed)"
echo "---"
echo "--- Step 0: auto-discover a reachable Portainer URL ---" echo "--- Step 0: auto-discover a reachable Portainer URL ---"
# The runner creates an ephemeral docker network per job, so the # The runner creates an ephemeral docker network per job, so the
# canonical PORTAINER_URL (e.g. http://192.168.1.30:9000) often isn't # canonical PORTAINER_URL (e.g. http://192.168.1.30:9000) often isn't