Repository navigation
Conversation
When a sandbox's pinned isolation backend no longer matched the gateway's selection, the automatic restart scan only logged a warning every 500 ms and left the sandbox in Starting with a stale restart reason. A sandbox that never started later failed with ImagePreparationTimedOut. The restart scan now moves the sandbox to Error with IsolationBackendMismatch, writing under the lock it holds with a compare-and-swap on the version it read. A preparation timeout reports the same reason when the backend does not match; an admission repair timeout keeps ProvisioningTimedOut. Startup and lifecycle recovery still skip mismatched sandboxes, because they run on every replica and a skipped sandbox may be running on the backend it was created with. Closes NVIDIA#4737 Signed-off-by: Shiju <shiju@nvidia.com>
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. api-behavior — No explicit risk acceptance foundFor preparation expiry with an isolation-backend mismatch,
Review details
Advisory review; publication gates are unchanged. |
drew
reviewed
Oct 21, 2026
Comment on lines
+1048
to
+1049
| If the sandbox was created with an isolation backend that no longer matches the gateway's selection, preparation expiry uses reason `IsolationBackendMismatch` instead. An automatic restart that finds the mismatch sets `Error` with the same reason without waiting for a deadline. Restore the gateway selection or create a new sandbox. After a mismatch timeout, wait for cleanup and start the sandbox as described below. After an automatic restart fails this way, stop the sandbox, then start it. | ||
|
|
Collaborator
There was a problem hiding this comment.
lets remove this from docs. this is too much of an implementation detail
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 a sandbox's pinned isolation backend no longer matched the gateway's selection, the automatic paths only logged a warning. A sandbox waiting for an automatic restart stayed in Starting with a stale "restart scheduled" reason and was retried every 500 ms. A sandbox caught mid-start later failed with
ImagePreparationTimedOut. This PR writes the mismatch to the sandbox status asIsolationBackendMismatch, with the existing "restore the gateway selection or create a new sandbox" message.Related Issue
Closes #4737
Changes
crates/openshell-server/src/compute/mod.rs: when the restart scan finds a mismatch,restart_sandbox_runtimemoves the sandbox to Error withIsolationBackendMismatch. It writes under the lock it already holds, with a compare-and-swap pinned to the version it read, so a concurrent stop or readiness update wins and the next scan decides again. The sandbox leaves the restart scan, so the warning is logged once.crates/openshell-server/src/compute/provisioning_deadline.rs: when the preparation deadline expires and the sandbox's backend no longer matches the selection,claim_provisioning_timeoutreportsIsolationBackendMismatchinstead ofImagePreparationTimedOut. Cleanup is unchanged. An admission repair expiry (the supervisor registered) keepsProvisioningTimedOutand its diagnostic.docs/how-it-works/sandboxes/overview.mdx: names the new reason and the recovery steps.Testing
Checklist