host: rename the OS user and stored objects (legacy-rename role) #584
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#584
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
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?
Part of bitborg/bitborg-docs#128 (ADR 0043).
Rename the OS user, its home and every stored object that carries the legacy name. Run after the Keycloak cutover in bitborg/bitborg-docs#127.
The user rename moves the home directory. The rootless graphroot lives under it and podman rejects a moved graphroot ("database configuration mismatch"). So the rename needs a fresh podman store. Volumes, secrets and networks are recreated in the new store and only volume data is copied.
Scope
legacy-renamerole, first in both plays.bitborg, uid 2000 kept. Linger, subuid, subgid, fstab updated.Done when
On each host:
getent passwd gitborgis empty andid bitborgshows uid 2000.grep -c gitborg /etc/passwd /etc/group /etc/shadow /etc/subuid /etc/subgid /etc/fstabis 0 everywhere.bitborg:podman volume ls,podman secret ls,podman imagesandsystemctl --user list-units --allcontain nogitborg.psql -c '\l' -c '\du'the same.restic snapshots --host gitborg-prodis empty.Rehearse on staging first. Take a backup and verify it before the window.
Scope additions (2026-10-14):
bitborg-iduser (uid 2001) keeps its container store on/srv/gitborg-data/bitborg-id/containers, bind-mounted withx-systemd.requires-mounts-for=/srv/gitborg-data. The unmount step must stopuser@2001and rewrite that fstab bind line. The bind target inside/home/bitborg-iddoes not change, so that store needs no copy.~/.config/bitborg/keycloakunder the old home. Moving~/.config/gitborgto~/.config/bitborgmust not nest one inside the other: move entries one by one and fail on a name clash.Staging rehearsal, 2026-10-14. Branch
feat/legacy-rename-role.--tags caddypass and then a full pass. Every verify item passed. The counts diff was empty,git fsckwas clean, and the invoices were intact.mainafterwards hit the same webhook stop, with the same workaround. Staging served on the old names again.main, because a rollback appliesmain). The relabel also refreshes udev, so the old by-label device unit no longer lingers.--checkshowedchanged=0afterwards. Script phases: save 85 s (services up), stop/user/mounts 17 s, load 91 s, volume copy 4 s. Services were down about 6 min.Staging now runs on the new names. Do not apply
mainto staging until this branch merges.Both windows ran on prod 2026-10-15 from feat/legacy-rename-role (#753). Window A (monitoring) stopped after the rename on a caddy.socket ordering bug, fixed on the branch, and finished on a plain re-run. Window B (services) took 15 min in one pass. After B: --check changed=0, no gitborg objects left, restic snapshots rewritten to bitborg-prod, backup, verify (pre-window and new archive), drill and sign-up drill passed. Closes when #753 merges. Purge follows in #585.