Repository navigation
fix(supervisor): report why the pool could not place a sandbox - #4985
Merged
drew merged 1 commit intoOct 28, 2026
Merged
Conversation
A launch the supervisor pool could not place was refused as AssignmentError::Capacity, so a pool with no attached member, a pool not ready yet, and a placement failure all surfaced as "the shared supervisor has no capacity for another sandbox instance". Add LaunchError::Unplaced carrying the pool's reason, and report a pool with no live member as having no attached replica instead of no replica with room. Capacity refusals of a full host are unchanged. Signed-off-by: divesh <dgude@nvidia.com>
drew
approved these changes
Oct 28, 2026
Collaborator
|
/ok to test 047d936 |
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 the shared supervisor pool cannot place a sandbox,
sandbox createnow reports why: the pool is not ready, no replica is attached, no replica has room, or placement failed. Previously every such case returned "the shared supervisor has no capacity for another sandbox instance", which is misleading right after an install, when no member has attached yet.Related Issue
No issue yet. Observed while testing #4864: on a fresh install, pool members attach 50–77 s after they become Ready, and creates in that window failed with the "no capacity" message although the pool was empty, not full.
Changes
openshell-supervisor-control: addLaunchError::Unplaced(String)carrying the pool's reason. "Pool not ready" andplace_launchfailures return it instead ofRefused(AssignmentError::Capacity).Refusedremains for a host that is at capacity.openshell-server:place_launchreports "no shared supervisor replica is attached to the gateway" when there is no live member, instead of "no replica with room". The existing no-member test now asserts that message.openshell-driver-kubernetes: mapUnplacedto the samePreconditionerror asRefused, so only the message changes.Open question for review:
place_launcherrors also include storage failures (for exampleread supervisor pool membership: <error>). These now reach the client's create error instead of only the gateway log. If that's not wanted, storage failures could map to a generic message, with the detail kept in the log.Testing
cargo clippy -p openshell-supervisor-control -p openshell-driver-kubernetes -p openshell-server --all-targets -- -D warningscargo nextest run -p openshell-supervisor-control -p openshell-driver-kubernetes: 319 passedcargo nextest run -p openshell-server -E 'test(/supervisor_pool::/)': 42 passedChecklist