Repository navigation
fix(runtime): report unstartable exec programs as exit 127/126 on every backend (RIG-5121) - #2225
Merged
Merged
Conversation
…ry backend (RIG-5121) guestd and the host backend now match podman. A missing program is exit 127 and a present program that cannot be invoked (no exec bit, not a regular file, ENOEXEC, execve EACCES/EPERM after the pre-check) is exit 126, with a reason on stderr. A missing or non-directory workdir, a missing script interpreter, and runtime faults stay Go errors. Adds one-shot and streaming contract-suite rows, rejects an empty guest exec_id, and amends the V2b and V8 records. Refs RIG-5121, RIG-2922 Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
😎 This pull request was merged. |
|
Compass engineering docs preview: https://compass-runner-rig-5121-exec.compass-eng-docs.pages.dev Deployed from Changed pages: |
…contract row (RIG-5121) microVM stdio is an unbuffered io.Pipe, so reading stdout to EOF before stderr deadlocked the response pump on the stderr frame and timed out the microvm job. Refs RIG-5121 Co-authored-by: Matt Wilkinson <matt@rigel.build>
Contributor
Author
|
Merge-ready at head Review: high 0 / medium 0 / low 0 after 6 rounds. The final round's one finding (the untested CI: all required checks are green on |
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
Implements Matt's ruling B' on RIG-5121. Every
WorkloadRuntime.Execbackend now reports a program it cannot start as an exit code, the way podman already does.ExitCode 127,err == nil, reason on stderrExitCode 126,err == nil, reason on stderrgo/internal/guestd/supervisor.go): a pre-check before spawn. One-shot returns anExecResponse. Streaming sends ExecStarted, stderr, then ExecExit. A PATH search skips unusable entries, as a shell does.go/internal/runtime/host_backend.go): the same pre-check and classification. A synthetic exited stream serves its output from memory. A done ctx is returned before the pre-check.ExecStarted.exec_id, because guestd reads an empty id as a whole-guest stop.TestExitCodeOf.err == nil, then rejects 126/127.Verification
go testfor runtime/..., guestd, runner/..., and cmd/compass-stack: all pass.go test -tags podman -run TestContractSuite_Podmanagainst live podman: passes. This caught, and the PR fixes, a streaming row that assumedExitStatusErroron podman.podman,microvm): 0 issues. nilaway (CI flags): 0.go vet -tags microvmand darwin vet: clean.moon run compass-proto:gen: no drift. Design-ledger gate OK. rumdl clean./dev/kvm). The microVM-tagged code is vetted and linted, and CI'smicrovmjob covers it.exitCodeOfgate) is fixed byTestExitCodeOf.Spec-impact:
proto/compass/v1/guest_control.protoExec contract comments; V2b and V8 record amendments.Ledger-impact: none.
Refs RIG-5121, RIG-2922