Repository navigation
Conversation
When an isolation backend refused at Attach, the supervisor exited without telling the gateway. The configuration it had reported Accepted before Attach stayed accepted, so the sandbox showed ConfigurationReady: True, and the revision it wrote at startup stayed Pending with no error. ReportSandboxConfigurationRequest gains refused_before_start. On a Denied or Attach refusal the supervisor reports the generation it accepted as Rejected with the flag set, and the gateway records the configuration as rejected with gateway-authored text. Unflagged reports keep today's behavior, so a runtime that fails to apply the generation it is running stays accepted. The supervisor also marks the revision this start wrote as Failed with the backend's message. A revision the user wrote and transient errors are left alone. Closes NVIDIA#4739 Signed-off-by: Shiju <shiju@nvidia.com>
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance found
Review details
Advisory review; publication gates are unchanged. |
shiju-nv
force-pushed
the
fix/4739-attach-refusal-report/shiju-nv
branch
from
October 21, 2026 07:28
085e666 to
882780f
Compare
This branch has not been deployed
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
When an isolation backend refused Attach, the supervisor exited without telling the gateway. The configuration stayed
ConfigurationReady: True (ConfigurationAccepted), and a revision the supervisor had written at startup stayed Pending with no error. The supervisor now reports the refusal: the gateway records the accepted configuration as rejected, and a revision this start wrote ends Failed with the backend's message.Related Issue
Closes #4739
Changes
proto/openshell.proto:ReportSandboxConfigurationRequestgainsbool refused_before_start = 4. It is set only with a Rejected admission for the generation that instance already reported Accepted. Omitted or false keeps today's behavior.crates/openshell-server/src/grpc/policy.rs:handle_report_sandbox_configurationmoves an Accepted configuration to Rejected only when the flag is set and the report names the same instance and generation. The message is gateway-authored; runtime text stays out of public status, as before. The flag with any other state isINVALID_ARGUMENT. Every unflagged report behaves as before, including a runtime that fails to apply the generation it is running (for example unreachable middleware), which keeps the accepted state.crates/openshell-core/src/grpc_client.rs:report_sandbox_configurationdelegates to the newreport_sandbox_configuration_request, which sends a caller-built request. The span name is unchanged.crates/openshell-supervisor/src/backend_setup.rs:attachtagsDeniedandAttacherrors as refusals.Descriptor(driver and TLS faults) andUnavailableare not tagged.crates/openshell-supervisor/src/lib.rs: on a tagged Attach error,run_sandbox_with_backendsends the flagged Rejected report for the accepted generation (one bounded attempt), then reports a revision this start wrote (image discovery or baseline-path write-back) Failed with the backend's message. A revision the user wrote is not marked. The original error is still returned.crates/openshell-server/src/storage_proto.rs:PUBLIC_RPC_SCHEMA_SHA256for the new public-only field, taken from the failing test output. Durable schemas are unchanged.sdk/go/proto/openshellv1/openshell.pb.go: regenerated withmise run go:proto:gen.docs/extensibility/isolation-backends.mdx: what users see after a refusal.Testing
cargo test -p openshell-supervisor --lib(177 passed),cargo test -p openshell-server --lib(2338 passed, 21 ignored, includingpublic_and_durable_schema_inventories_are_complete),cargo test -p openshell-core --lib(574 passed)cargo clippy -p openshell-supervisor -p openshell-server -p openshell-core --all-targets -- -D warnings,cargo fmt --check,go build ./...insdk/go,mise run go:proto:checkattach_refusal_is_marked_as_a_refusal: a refused Attach carries the refusal code.attach_refusal_reports_the_accepted_generation_as_refused: the report names the accepted instance and generation and setsrefused_before_start; transient errors, local policy and a missing instance send nothing.attach_refusal_fails_only_the_revision_this_start_wrote.configuration_admission_records_refusal_of_accepted_generation: an unflagged same-generation rejection keeps Accepted, the flag with Accepted isINVALID_ARGUMENT, and a flagged rejection becomesConfigurationInvalidwithout runtime text.examples/isolation-backend-v8, whose backend refuses Attach whenprocess.run_as_userdiffers from the host identity:run_as_user: "1500"on a uid 502 host,openshell sandbox getshowsConfigurationReady: False (ConfigurationInvalid)with the gateway message;mainthe same run showsConfigurationReady: True (ConfigurationAccepted).Recovery
Delete the sandbox and create it again with a policy the backend accepts. A refused sandbox stays in Provisioning until its repair deadline, and
sandbox start,sandbox stopand a process-policy change are all refused in that phase, as onmain.Checklist