bug: nomad/jobs/edge.hcl uses service "forgejo" (Consul) but factory runs Nomad native service discovery #1114

Closed
opened 2026-04-21 12:48:59 +00:00 by dev-bot · 1 comment
Collaborator

Symptom

On a fresh disinto init --backend=nomad --with edge, the edge alloc stays in Client Status = pending indefinitely. Alloc events show:

Template    Missing: health.service(forgejo               passing)
Alloc Unhealthy    Task not running by healthy_deadline of 5m0s

forgejo alloc itself is healthy — nomad service info forgejo returns the registration, nomad alloc checks shows Status = success. Problem is edge's template can't see it.

Root cause

nomad/jobs/edge.hcl line 133 and line 244:

{{ range service "forgejo" -}}
FORGE_URL=http://{{ .Address }}:{{ .Port }}
{{- end }}

{{ range service "x" }} queries Consul. This factory runs with Consul disabled (systemctl is-active consulinactive). Nomad native service discovery (provider = "nomad" in the job spec) requires nomadService in templates.

Line 165 in the same file already uses the correct form: {{ range nomadService "staging" }} — only the forgejo lookups were missed when services migrated off Consul.

Reproduction

Fresh install on disinto-nomad-box, Nomad 1.9.5, Vault 1.18.5:

disinto init --backend=nomad --with edge --yes
nomad job allocs edge    # alloc stays pending
nomad alloc status <edge-alloc-id> | grep Template
# → Template    Missing: health.service(forgejo passing)

Fix

Replace the two occurrences of range service "forgejo" with range nomadService "forgejo" in nomad/jobs/edge.hcl (lines 133, 244). Verified: after patch, edge alloc advances past template rendering.

Acceptance

  • grep "range service" nomad/jobs/edge.hcl returns nothing
  • Fresh disinto init --backend=nomad --with edge produces a running edge alloc (subject to other bugs filed separately)
## Symptom On a fresh `disinto init --backend=nomad --with edge`, the `edge` alloc stays in `Client Status = pending` indefinitely. Alloc events show: ``` Template Missing: health.service(forgejo passing) Alloc Unhealthy Task not running by healthy_deadline of 5m0s ``` forgejo alloc itself is healthy — `nomad service info forgejo` returns the registration, `nomad alloc checks` shows `Status = success`. Problem is edge's template can't see it. ## Root cause `nomad/jobs/edge.hcl` line 133 and line 244: ``` {{ range service "forgejo" -}} FORGE_URL=http://{{ .Address }}:{{ .Port }} {{- end }} ``` `{{ range service "x" }}` queries Consul. This factory runs with Consul disabled (`systemctl is-active consul` → `inactive`). Nomad native service discovery (provider = "nomad" in the job spec) requires `nomadService` in templates. Line 165 in the same file already uses the correct form: `{{ range nomadService "staging" }}` — only the forgejo lookups were missed when services migrated off Consul. ## Reproduction Fresh install on `disinto-nomad-box`, Nomad 1.9.5, Vault 1.18.5: ```bash disinto init --backend=nomad --with edge --yes nomad job allocs edge # alloc stays pending nomad alloc status <edge-alloc-id> | grep Template # → Template Missing: health.service(forgejo passing) ``` ## Fix Replace the two occurrences of `range service "forgejo"` with `range nomadService "forgejo"` in `nomad/jobs/edge.hcl` (lines 133, 244). Verified: after patch, edge alloc advances past template rendering. ## Acceptance - `grep "range service" nomad/jobs/edge.hcl` returns nothing - Fresh `disinto init --backend=nomad --with edge` produces a running edge alloc (subject to other bugs filed separately)
dev-bot added the
backlog
tech-debt
labels 2026-04-21 12:48:59 +00:00
dev-bot self-assigned this 2026-04-21 12:54:18 +00:00
dev-bot added
in-progress
and removed
backlog
labels 2026-04-21 12:54:18 +00:00
Author
Collaborator

Blocked — issue #1114

Field Value
Exit reason ci_timeout
Timestamp 2026-04-21T13:25:31Z
### Blocked — issue #1114 | Field | Value | |---|---| | Exit reason | `ci_timeout` | | Timestamp | `2026-04-21T13:25:31Z` |
dev-bot added
blocked
and removed
in-progress
labels 2026-04-21 13:25:32 +00:00
disinto-admin added
backlog
and removed
blocked
labels 2026-04-21 15:11:42 +00:00
dev-bot was unassigned by disinto-admin 2026-04-21 15:11:42 +00:00
dev-qwen self-assigned this 2026-04-21 16:07:35 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-21 16:07:36 +00:00
dev-qwen removed their assignment 2026-04-21 16:23:37 +00:00
dev-qwen removed the
in-progress
label 2026-04-21 16:23:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#1114
No description provided.