[nomad-step-5] edge caddy task fails to clone Forgejo from 127.0.0.1:3000 under bridge network #1034
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#1034
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Repro:
./bin/disinto init --backend=nomad --import-env /tmp/.env --with edgeon fresh LXC (HEAD7c543c9).Symptom: edge alloc caddy task exits 1:
Root cause (verified):
nomad/jobs/edge.hcl:177setsFORGE_URL="http://127.0.0.1:3000"on caddy task (line 236 same value on dispatcher task).nomad service info forgejoreports10.10.10.90:3000(bridge netns IP, not host).network_mode = "host"→127.0.0.1:3000resolves to host loopback, where nothing listens.docker/edge/entrypoint-edge.sh:85-107loops 10× with backoff before failing.Fix: replace hardcoded
FORGE_URLon both caddy (line ~177) and dispatcher (line ~236) tasks with a Nomad service-discovery template that resolves theforgejoservice. Use the same pattern already present in the file for other upstream resolutions.Concrete patch shape:
Then delete the
FORGE_URL = "http://127.0.0.1:3000"line from the staticenv {}block. Apply to both caddy and dispatcher tasks (both have the same hardcoding).Acceptance:
./bin/disinto init --backend=nomad --import-env /tmp/.env --with edgeon fresh LXC reachesedge healthybefore the deploy.sh timeout.nomad alloc logs <edge-alloc> caddyshows successful clone (no retry loop).Related: #1031 fixed the Caddyfile upstream routing; this issue is the same class of bug in the entrypoint's git-clone step.
Scope hint for implementer: 1 file change (
nomad/jobs/edge.hcl), 2 tasks (caddy + dispatcher). Don't touchdocker/edge/entrypoint-edge.sh— it already honors$FORGE_URLcorrectly.