fix(nb): give the WoW server units a usable PATH #249
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!249
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/nb-wow-server-unit-path"
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?
#248 asserted that these units would inherit the user manager's PATH. That is
wrong, and I should have checked it rather than reasoned about it.
systemctl --user show wow-server.service -p Environmenton the deployed unit:NixOS pins a unit's PATH to that set.
systemctl --user show-environmentshowssomething much larger, but that is the manager's environment, and units get
an explicit
Environment=PATH=that overrides it. So:podman— missing. The entire point of the unit.rsync— missing. The database copy in and back out.awk— missing.bash— missing, so#!/usr/bin/env bashwould not have resolved either./run/wrappers/bin— missing, so nonewuidmap/newgidmap. That is thesetuid pair rootless podman uses to write its uid_map, which is the exact
mapping this whole delegation exists to obtain. Without it the units would
have reproduced the single-mapping failure they were written to avoid.
Why it slipped through
The first real launch never reached the units at all.
environment.sessionVariablesonly apply to newly created login sessions, and the running sway session predated
the deploy, so
WOW_SERVER_VIA_SYSTEMDwas unset inside Steam andserver-up.shtook its non-delegating path. It failed against the card's image store instead,
which masked the unit bug behind an unrelated one.
Verified separately that a clean login session does pick both variables up
(
env -i … bash -lreturns them; a plainbash -ldoes not, because/etc/profileguards on__NIXOS_SET_ENVIRONMENT_DONE, which an existingsession already has set — that guard is what made an earlier check of mine
report a false negative).
Testing
scripts/test-configuration nbpasses. Still unproven end to end: an actualdelegated launch. The tell in
server/logs/session.logis==> delegating server start to wow-server.service.