[nomad-step-5] edge dispatcher task: Missing vault.read(kv/data/disinto/bots/vault) on fresh init #1035
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#1035
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.Symptom: edge alloc dispatcher task pending;
nomad alloc statusshows:Root cause (verified):
nomad/jobs/edge.hcl:224template readskv/data/disinto/bots/vault.service-dispatcher(edge.hcl:41) → policyservice-dispatcher.vault/policies/service-dispatcher.hclgrants read onkv/data/disinto/runner/*+kv/data/disinto/shared/ops-repoonly. Does NOT grantkv/data/disinto/bots/vault.vault/policies/AGENTS.md:35documents the intent: dispatcher is a service, should read fromshared/ops-repo, not the bot-vault path (which is reserved for agent tasks usingservice-agentspolicy — service-agents.hcl:65 grants it).shared/ops-repopath is never seeded:vault kv list kv/disinto/shared/returnschat, forge, forgejo, woodpeckeronly.So the template path and the seed are both missing — the dispatcher template was copy-pasted from
nomad/jobs/agents.hcl:192(which uses bot-vault legitimately) without updating either path or seed.Fix (two parts, both small):
Change template in
nomad/jobs/edge.hcl:220-230— read fromshared/ops-repo:Add new seed step to mirror the vault bot's creds into
shared/ops-repo. Either:tools/vault-seed-ops-repo.shthat copieskv/disinto/bots/vault→kv/disinto/shared/ops-repo(token,passkeys), invoked fromlib/init/nomad/aftervault-seed-agents.sh. Simpler.tools/vault-seed-agents.shto also writeshared/ops-repowhen it seedsbots/vault. Fewer scripts but mixes concerns.Prefer (a) — matches the one-script-per-path pattern of the other seeds.
Acceptance:
./bin/disinto init --backend=nomad --import-env /tmp/.env --with edge,vault kv get kv/disinto/shared/ops-reporeturns atokenfield.nomad alloc status <edge-alloc>shows dispatcherrunning, no Template Missing error.nomad alloc exec <edge-alloc> dispatcher env | grep FORGE_TOKENshows the seeded token.Scope hint for implementer:
nomad/jobs/edge.hcl(one template block change) + one new ~20-line seed script + one-line wire-up inlib/init/nomad/deploy.sh(or wherever the seeds are called). Do NOT modifyvault/policies/service-dispatcher.hcl— the policy is correct; the template was wrong.