Skip to content

fix(supervisor): report why the pool could not place a sandbox - #4985

Merged
drew merged 1 commit into
NVIDIA:mainfrom
FrostGod:fix/supervisor-pool-placement-errors/FrostGod
Oct 28, 2026
Merged

drew merged 1 commit into
NVIDIA:mainfrom
FrostGod:fix/supervisor-pool-placement-errors/FrostGod

Conversation

@FrostGod

Copy link
Copy Markdown
Collaborator

Summary

When the shared supervisor pool cannot place a sandbox, sandbox create now 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: add LaunchError::Unplaced(String) carrying the pool's reason. "Pool not ready" and place_launch failures return it instead of Refused(AssignmentError::Capacity). Refused remains for a host that is at capacity.
  • openshell-server: place_launch reports "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: map Unplaced to the same Precondition error as Refused, so only the message changes.
  • Crate READMEs updated to match.

Open question for review: place_launch errors also include storage failures (for example read 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 warnings
  • cargo nextest run -p openshell-supervisor-control -p openshell-driver-kubernetes: 319 passed
  • cargo nextest run -p openshell-server -E 'test(/supervisor_pool::/)': 42 passed
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

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>
@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@FrostGod
FrostGod requested a review from drew October 27, 2026 22:23
@drew

drew commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

/ok to test 047d936

@drew
drew enabled auto-merge October 28, 2026 03:50
@drew
drew added this pull request to the merge queue Oct 28, 2026
Merged via the queue into NVIDIA:main with commit 9b1ffd3 Oct 28, 2026
83 checks passed
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