fix(forgejo): defer the oidc source when the idp is unreachable on a fresh host #656
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!656
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/fresh-host-image-bootstrap"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Refs #613.
The Keycloak image part of #613 is done by #641 and #643. This fixes a second first-pass blocker.
The forgejo role runs before caddy. On a fresh host nothing serves the identity provider's discovery URL yet, so
forgejo admin auth add-oauthexits 1 (Failed to initialize OpenID Connect Provider ... connection refused) and aborts the play. That hits every rebuild with the client secret vaulted, and a fresh staging host today. Forgejo creates no source on that error, so a retry starts clean.oidc-source.yml: the add tolerates only that error and prints a note to runsite.ymlagain. Any other error stays fatal.Rebuild order: pass 1 (clean stack, Keycloak staged, source deferred), restore the databases and the storage tier, pass 2 (Keycloak starts, source added).
Still open: a from-scratch stand-up with no restored realm fails the end-of-run health gate on realm discovery. It needs the
opentofu/keycloakrealm apply between the passes.Checked: reproduced the error in a throwaway
forgejo:16.0.5-rootlesscontainer; a scratch playbook shows the error tolerated and any other error fatal;ansible-playbook site.yml --syntax-check; ansible-lint; pre-push hooks. Not tested on a real fresh host.209e42645852caac40d0