Repository navigation
Report why user namespace setup fails - #81
Merged
Merged
Conversation
When the environment refused the user namespace mapping, mere shell printed "unknown error" with the detail "failed to write uid_map". The failing operation, the path and the errno were dropped at the call, and nothing said the profile and packages were untouched. Pass the Context to enterEnv, forkAndEnterEnv and the namespace runner instead of a bare allocator, so namespace setup can report through it. unshare, the uid_map and gid_map writes now set a subject and details naming the operation and the cause. EPERM, EACCES and ENOSPC (the max_user_namespaces limit) add that the environment is restricting user namespaces and that profiles and packages are not affected. The shell command keeps these details and uses its static text only as a fallback. Add friendly messages for UnshareError, UidMapError and GidMapError. Only the shell path carries the details to the user. The build path runs setup in a forked child and still reports the error name alone. Refs #66
jhuntwork
force-pushed
the
report-user-namespace-failures
branch
from
November 3, 2026 03:01
8501b01 to
ca586cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the environment refused the user namespace mapping, mere shell
printed "unknown error" with the detail "failed to write uid_map". The
failing operation, the path and the errno were dropped at the call, and
nothing said the profile and packages were untouched.
Pass the Context to enterEnv, forkAndEnterEnv and the namespace runner
instead of a bare allocator, so namespace setup can report through it.
unshare, the uid_map and gid_map writes now set a subject and details
naming the operation and the cause. EPERM, EACCES and ENOSPC (the
max_user_namespaces limit) add that the environment is restricting user
namespaces and that profiles and packages are not affected. The shell
command keeps these details and uses its static text only as a fallback.
Add friendly messages for UnshareError, UidMapError and GidMapError.
Only the shell path carries the details to the user. The build path runs
setup in a forked child and still reports the error name alone.
Refs #66