Repository navigation
Containers: exec straight after start finds the image's users (#311) - #343
Merged
libracoder merged 1 commit intoNov 16, 2026
Merged
Conversation
Owner
|
@Dazzanova thanks for this PR. Before it can be reviewed and merged, every commit needs to be signed. GitHub shows these as unsigned: 82a0a76. Please sign them (GPG or SSH, with the key added to your GitHub account as a signing key), then force-push. GitHub's guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
…oder#311) A start now waits for the container child to make its mounts and run pivot_root before reporting success. An immediate exec could previously join the mount namespace while its root was still the agent's, so an image user was unknown, especially while a fresh volume was being copied up. Fixes libracoder#311.
Dazzanova
force-pushed
the
fix/311-exec-after-start-user
branch
from
November 16, 2026 17:18
82a0a76 to
b91ff4b
Compare
Contributor
Author
|
Noted! I have signed with an SSH signing key, so please have a look at the PR and let me know if any change is required. |
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.
Summary
pivot_rootbefore reporting success.docker execfrom joining the container's mount namespace while its root is still the agent's, where users from the image do not exist.Root cause
container::spawnreturned as soon as the child was cloned. Filling a fresh named volume from the image (copy-up) delayedpivot_root, widening the window where an exec read the host's/etc/passwdinstead of the image's. Retrying a second later worked because the root was then in place.Changes
pivot_rootand namespace setup;spawnwaits for it before reportingStarted.tests/e2e.sh,tests/linux-host.shandtests/wsl.sh: start containers with fresh named volumes and immediately exec as the image's non-root user.Testing
cargo check -p kiri-initcargo test -p kiri-init --bin kiri-init container::tests— 11 passedbash -n tests/e2e.sh tests/linux-host.sh tests/wsl.shFixes #311