fix: [nomad-step-3] S3.2 — nomad/jobs/woodpecker-agent.hcl (host-net, docker.sock) (#935) #939
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#939
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-935"
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?
Fixes #935
Changes
AI Review
Blockers
critical
nomad/jobs/woodpecker-agent.hcl:42: Vault role mismatch —vault { role = "woodpecker-agent" }references a role that does not exist invault/roles.yaml. The only Woodpecker entry there isservice-woodpeckerwithjob_id: woodpecker, which also won't match this job's Nomad job ID (woodpecker-agent). The comment at line 35 explicitly claims "role = 'woodpecker-agent' is defined in vault/roles.yaml" — it is not. At deployment, the Vault JWT exchange will fail with "role not found" and the alloc will refuse to place. Fix: add a new entry tovault/roles.yaml(e.g.name: service-woodpecker-agent,policy: service-woodpecker,namespace: default,job_id: woodpecker-agent) and change the jobspec's vault stanza torole = "service-woodpecker-agent".critical
nomad/jobs/woodpecker-agent.hcl:50:port = "healthz"in the service stanza references an undefined port label. There is nonetwork { port "healthz" { ... } }stanza in this job group. Nomad job registration will reject this with a validation error. The forgejo.hcl sibling shows the required pattern: a group-levelnetwork { port "http" { static = 3000, to = 3000 } }stanza paired withports = ["http"]in the docker config. Add an equivalentnetwork { port "healthz" { static = 3333 } }stanza and reference it in the task docker config asports = ["healthz"].Notes (non-blocking)
info
nomad/jobs/woodpecker-agent.hcl:20: Header comment says policy is invault/policies/woodpecker-agent.hcl— the actual file isvault/policies/service-woodpecker.hcl. Update the comment when fixing the role name.info
nomad/jobs/woodpecker-agent.hcl:21:tools/vault-seed-woodpecker.shis referenced in comments but does not exist (avault-seed-forgejo.shexists as the template). The empty-Vault fallback handles fresh boxes safely, so this can be a follow-up, but should be tracked.info
nomad/jobs/woodpecker-agent.hcl:71:privileged = trueis broader than thedocker.sockmount requires (privileged grants all Linux capabilities + host device access). If the compose setup does not useprivileged: true, remove it —docker.sockaccess only requires the group socket permission, not full privilege. Worth confirming against compose before cutover.Verdict
REQUEST_CHANGES — Vault role name doesn't exist in roles.yaml; service port label undefined
Reviewed at
722b39a| AGENTS.mdAI Review: REQUEST_CHANGES — Vault role name doesn't exist in roles.yaml; service port label undefined
722b39a0adto5d76cc96fbAI Re-review (round 2)
Previous Findings
Vault role mismatch
vault/roles.yaml+woodpecker-agent.hcl:42→ FIXED: role renamed toservice-woodpecker-agentin the jobspec; matching entry added tovault/roles.yaml(lines 60-63) withpolicy: service-woodpecker,job_id: woodpecker-agent. JWT exchange will succeed.Undefined port label
woodpecker-agent.hcl:50→ FIXED:network { port "healthz" { static = 3333 } }stanza added at group scope;service { port = "healthz" }now resolves.info — comment policy path → FIXED: header now reads
vault/policies/service-woodpecker.hcl.info — vault-seed-woodpecker.sh missing → FIXED: script added at
tools/vault-seed-woodpecker.shwith correct idempotency contract, using the newly extractedhvault_ensure_kv_v2helper.info — privileged = true → still present and advisory-only; unchanged from prior review, no new concern.
New Issues
nomad/jobs/woodpecker-server.hcl:50-52: The comment says "the job_id in vault/roles.yaml is 'woodpecker'" but the same PR updated it to 'woodpecker-server'. The comment is now stale. Non-blocking — the code is correct; the comment is just misleading for the next reader.Verdict
APPROVE — Both blockers from prior review are fixed: role name corrected and network port stanza added
Reviewed at
5d76cc9| Previous:722b39a| AGENTS.mdAI Re-review (round 2): APPROVE — Both blockers from prior review are fixed: role name corrected and network port stanza added