container preflight fails: newuidmap not on the lab unit PATH (rootless podman) #228
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#228
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Starting a containerized agent is refused by preflight:
Diagnosis
versionsubcommand./etc/subuid//etc/subgidcarrylab:100000:65536, and setuidnewuidmap/newgidmapexist in/run/wrappers/bin(NixOS security wrappers).nix/module.nixbuilds the lab unit PATH exclusively from nix store packages (deliberately — since #202 the unit PATH is the only tool source), and/run/wrappers/binis not on it. Rootless podman cannot map its subordinate ID range without setuid newuidmap/newgidmap, and a nix package can never provide one (the store forbids setuid bits), so this is only fixable at the unit-PATH level.PATH=/run/wrappers/bin:$PATH podman versionsucceeds on the affected host.Fix
"/run/wrappers"to the container-gatedpathlist innix/module.nix(NixOS appends/binvia makeBinPath — standard nixpkgs idiom for units needing setuid helpers)./run/wrappers/binmust appear on the container-enabled (and default, container-on-by-default per #220) unit PATH line, and must NOT leak onto a container-disabled unit.Note: podman's stderr is already folded into the preflight failure detail by ExecRunner, which is how the real cause surfaced — no change needed there.