Skip to content

fix: Follow-ups to the sandbox integration - #491

Merged
jedevc merged 7 commits into
prod-stagingfrom
jedevc/fix/sandbox-followups
Sep 4, 2026
Merged

fix: Follow-ups to the sandbox integration#491
jedevc merged 7 commits into
prod-stagingfrom
jedevc/fix/sandbox-followups

Conversation

@jedevc

@jedevc jedevc commented Sep 4, 2026

Copy link
Copy Markdown
Member

Review follow-ups on #458, one fix per commit.

The user-visible ones: unikraft instance exec now exits with the status its command exited with, so a script can check it, and Ctrl-C waits for that command to die of the interrupt instead of giving up on it at once. Underneath, the two output streams are kept apart — folding them onto stdout is the exec command's choice, not something baked in below it — and standard input that fails part way through closes the command's input rather than leaving a cat waiting on it forever.

…rary

Signed-off-by: Justin Chadwell <justin@unikraft.com>
Signed-off-by: Justin Chadwell <justin@unikraft.com>
…iven

Signed-off-by: Justin Chadwell <justin@unikraft.com>
Signed-off-by: Justin Chadwell <justin@unikraft.com>
Signed-off-by: Justin Chadwell <justin@unikraft.com>
Signed-off-by: Justin Chadwell <justin@unikraft.com>
Signed-off-by: Justin Chadwell <justin@unikraft.com>
@jedevc
jedevc force-pushed the jedevc/fix/sandbox-followups branch from 2e88828 to 6153c5a Compare September 4, 2026 15:32
@jedevc
jedevc marked this pull request as ready for review September 4, 2026 16:16

@dragosgheorghioiu dragosgheorghioiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Dragos Gheorghioiu <dragosg@unikraft.com> 
Approved-by: Dragos Gheorghioiu <dragosg@unikraft.com>

Comment thread cmd/unikraft/main.go
Comment on lines +57 to +63
// a command that ran on an instance and failed isn't an error of ours, so
// exit with the status it exited with and print nothing over its output
exitCode := 0
if exited, ok := errors.AsType[*sandbox.ExitError](err); ok {
exitCode, err = exited.ExitCode(), nil
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does make more sense than what i had before
i had the impression it should just swallow the command completely including the exit code

Comment thread internal/sandbox/cmd.go
case c.WaitDelay == 0:
return c.interrupted()
case c.WaitDelay > 0:
if c.WaitDelay > 0 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jedevc
jedevc merged commit 5d874c7 into prod-staging Sep 4, 2026
13 checks passed
@jedevc
jedevc deleted the jedevc/fix/sandbox-followups branch September 4, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants