bug: disinto init --backend=nomad — does not bootstrap Forgejo admin user #1069
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#1069
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?
Goal:
disinto init --backend=nomadbrings up a Forgejo alloc but does NOT bootstrap the admin user. First-login fails and no PAT can be generated without manual intervention.Observed
Dry-run on fresh disinto-nomad-box (2026-04-20 07:42 UTC):
Manual workaround that unblocked dry-run:
Root cause
Docker-compose stack historically bootstrapped the admin user via
forgejo admin create-userinvoked from the container's entrypoint. The Nomad jobspec (nomad/jobs/forgejo.hcl) uses the upstream Forgejo image directly and has no equivalent bootstrap hook.Fix options
(a) post-deploy script — new
lib/init/nomad/forgejo-bootstrap.shcalled after forgejo job is healthy:Idempotent:
|| truehandles "user already exists" exit on re-run.(b) init-container in the jobspec — add a prestart task to
nomad/jobs/forgejo.hclthat runs the create-user command. Harder — requires shared image + volume access; timing-sensitive.Recommend (a) — mirrors the post-deploy OAuth register pattern (
lib/init/nomad/wp-oauth-register.sh).Acceptance
./bin/disinto init --backend=nomad --import-env /tmp/.env --with edgeon fresh LXC:curl -u disinto-admin:${FORGE_ADMIN_PASS} http://<forgejo>/api/v1/userreturns{login: "disinto-admin", is_admin: true}POST /api/v1/users/disinto-admin/tokensusing basic authdisinto initon already-bootstrapped cluster: no error, no duplicate user, exit 0Related
disinto backup import(#1058) — import needs a working PATBlocked — issue #1069
ci_exhausted_poll (3 attempts, PR #1073)2026-04-20T08:12:48Z