feat(nb): run the WoW card's AzerothCore server as user units #248
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!248
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/nb-wow-server-user-units"
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?
Completes the WoW card work. #247 was necessary but not sufficient — this is the
fallback it ruled in.
Why A is dead
With
/etc/subuidbound into Steam's FHS (#247), podman stops silentlydegrading and instead attempts the real mapping:
newuidmapis setuid, and setuid does not elevate inside an alreadyunprivileged user namespace — which is precisely what bubblewrap has created.
No amount of configuration fixes that; rootless podman cannot nest in Steam's
sandbox.
#247 is still right and still needed: before it, podman did not fail at all, it
fell back to single-uid mapping, which silently cannot reach the card's
userns-mapped files. It converted a silent wrong answer into an honest error.
What works instead
The sandbox can still reach the host's user systemd over
/run/user/1000/bus—verified:
systemctl --user is-system-runningreturnsrunningfrom insidesteam-run, and baresystemctlresolves there, so the card scripts stayportable. So the podman half moves out of the sandbox:
server-up.sh/server-down.shdelegate towow-server.servicewhenWOW_SERVER_VIA_SYSTEMDis set. The unit clears the variable, so the samescript run by
ExecStart/ExecStopdoes the real work instead of recursing.bot-band.shneedspodman execinto the database container for the samereason, so it becomes
wow-bot-band.service,PartOfthe server so it stopswith the stack.
session.shalready treats this one as never-fatal.This preserves the card's design — server starts with the game, stops when you
quit, including via Steam's Stop button, since
session.sh's exit trap stillcalls
server-down.sh.The card-side change is three guards in the same idiom as the
WOW_GRAPHROOTone, all no-ops where the variable is unset — so the handheld is unaffected.
Notes
No PATH handling needed: the user manager's default already carries
/run/wrappers/bin(newuidmap) and/run/current-system/sw/bin(podman,rsync), and
/usr/bin/envexists for the shebangs. It does not inheritenvironment.sessionVariables, though, soWOW_GRAPHROOTis repeated in theunit environment — that asymmetry is deliberate, not duplication by accident.
Testing
scripts/test-configuration nbpasses. Runtime verification after deploy:systemctl --user start wow-server.service, then the containers coming up andthe client reaching the login screen.