fix(create): report actual exit status when nsenter exits unsuccessfully#676
Open
mdryaan wants to merge 2 commits into
Open
fix(create): report actual exit status when nsenter exits unsuccessfully#676mdryaan wants to merge 2 commits into
mdryaan wants to merge 2 commits into
Conversation
✅ Deploy Preview for urunc canceled.
|
Contributor
|
Hello @mdryaan , you will need to add yourself in https://github.com/urunc-dev/urunc/blob/main/.github/contributors.yaml |
f3f17ca to
31917e1
Compare
Author
@cmainas Done! Please take a look |
Contributor
|
Hello @mdryaan , there are some conflicts that need to get resolved. |
Author
|
@cmainas Done |
4 tasks
Contributor
|
Hello @mdryaan , please do not use merge commits. Simply rebase your changes over main |
Signed-off-by: mdryaan <alikhurshid842001@gmail.com>
6b01d06 to
ca2ca2e
Compare
Signed-off-by: mdryaan <alikhurshid842001@gmail.com> Signed-off-by: Md Raiyan <alikhurshid842001@gmail.com>
ca2ca2e to
4dfc0e8
Compare
Author
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
handleNsenterRetincmd/urunc/create.gowrapserrwith%winthe branch that handles an unsuccessful nsenter exit. That branch isonly reachable whenerr == nil— theerr != nilcase is handled above it. The resulting error message always reads"nsenter unsuccessful exit: <nil>", hiding the actual exit code.Fixed by formatting the exit code from
status.ExitCode()directly instead of wrappingerr.Related issues
How was this tested?
Fix verified by code inspection — the branch is only reachable when
erris nil, making the%wwrap provably wrong. All CI checks pass locally:golangci-lint run -v --timeout=5m— 0 issuesgo test ./pkg/unikontainers/... ./internal/metrics/... ./pkg/network/...— PASSmake— builds successfullyLLM usage
N/A
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).