quadlet: UsernsMode= is compose syntax — use the v1 key UserNS=host

podman 5.7 podman-user-generator on dankserver hard-fails the whole unit on
the unknown key ('unsupported key UsernsMode in group Container'), so the
first cutover attempt masked the native unit and then found no plex.service
at all. Swap both units to UserNS=host (same --userns=host flag), update the
ownership-contract seam test to pin the exact key, and correct both docs.
Pin the seam: the v1 generator rejects unknown Container keys silently at
deploy distance — the test now pins UserNS=, not the misspelled alias.
This commit is contained in:
Frank committed 2026-09-01 22:36:43 -07:00
1 parent 592a0baa35
commit 1939135e4c
5 files changed
+9 -11

No files matched your search

+5 -5
View File
@@ -67,14 +67,14 @@ load helpers
grep -q '^PublishPort=8181:8181$' "$REPO_ROOT/dankserver/tautulli/quadlet/tautulli.container" || return 1
}
@test "plex keeps the native unit's identity (userns=host, PUID=997, PGID=984)" {
@test "plex keeps the native unit's identity (UserNS=host, PUID=997, PGID=984)" {
# Zero-chown ownership contract: /var/lib/plexmediaserver is bind-mounted
# in place, so every file the container writes must land owned 997:984 —
# byte-identical to the former plexmediaserver.service identity. If the
# v1 generator ever drops UsernsMode=, files appear as the rootless
# subuid and the migration invariant is broken; pin both keys.
# byte-identical to the former plexmediaserver.service identity. UserNS=
# is the quadlet v1 key (UsernsMode= is compose syntax and the generator
# hard-fails the whole unit on it); pin the exact keys.
unit="$REPO_ROOT/dankserver/plex/quadlet/plex.container"
grep -q '^UsernsMode=host$' "$unit" || return 1
grep -q '^UserNS=host$' "$unit" || return 1
grep -q '^Environment=PUID=997$' "$unit" || return 1
grep -q '^Environment=PGID=984$' "$unit" || return 1
}