fix: call createUnikontainer, not reexecUnikontainer, in run command - #1016
Draft
magic-peach wants to merge 1 commit into
Draft
fix: call createUnikontainer, not reexecUnikontainer, in run command#1016magic-peach wants to merge 1 commit into
magic-peach wants to merge 1 commit into
Conversation
The run command's action func called reexecUnikontainer() directly before startUnikontainer(). reexecUnikontainer is meant to run inside the reexec'd child process that createUnikontainer spawns: it reads the _LIBCONTAINER_INITPIPE/_LIBCONTAINER_LOGPIPE file descriptors that only that spawned child inherits, and blocks waiting for the StartExecve message that startUnikontainer sends over a socket set up by the still-running reexec child. Calling reexecUnikontainer directly in the original urunc process skips all of that setup, so it always failed immediately on the missing env vars, before startUnikontainer ever ran. This left the run command entirely non-functional. The pre-refactor implementation of this command (before the refactor in 9271e4f, which is where the FIXME above this code was left) called the create-side function first and then the start-side function, which is the same pairing create/start use on their own. Restore that by calling createUnikontainer(), matching what the create command does for its non-reexec path. Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
✅ Deploy Preview for urunc canceled.
|
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.
Description
The run command's action func called reexecUnikontainer() directly before startUnikontainer(). reexecUnikontainer is meant to run inside the reexec'd child process that createUnikontainer spawns calling it directly in the original urunc process skipped that setup, so it always failed immediately, meaning urunc run was non-functional. Restores calling createUnikontainer() first, matching what create already does for its non-reexec path.
Related issues
none
How was this tested?
Cross-compiled and vetted clean (GOOS=linux GOARCH=amd64); the macOS-native build fails on an unrelated pre-existing CGO/nsenter constraint that also reproduces on unmodified main.
LLM usage
N/a
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).