Repository navigation
Conversation
…he pool route directory A pool member's assignment snapshot no longer carries every route in the pool. A member asks the gateway for the owner of a route it does not own (RouteLookup/RouteOwner on the existing Attach stream) only when a sandbox runtime reaches it for that route, so a member's messages scale with its own sandboxes rather than with the pool. Closes #5783 Signed-off-by: divesh <dgude@nvidia.com>
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance foundWithin openshell_sdk::raw::proto::supervisor_host::v1, AssignmentSnapshot loses route_directory and the previously exhaustive HostMessage/HostGatewayMessage payload enums gain RouteLookup/RouteOwner variants.
Review details
Advisory review; publication gates are unchanged. |
| send_reply(&mut stream, deadline, &[ROUTE_REPLY_UNKNOWN]).await?; | ||
| local, | ||
| } => { | ||
| let lookup_deadline = deadline.min(tokio::time::Instant::now() + ROUTE_LOOKUP_TIMEOUT); |
There was a problem hiding this comment.
The 2-second lookup timeout consumes the runtime's entire route-negotiation budget. negotiate_route_at in crates/openshell-sandbox/src/boundary_server.rs uses RUNTIME_ROUTE_HOP_TIMEOUT = 2s for connecting, sending the preface, and reading the reply. This lookup starts after those first two steps and can itself wait another 2 seconds.
Previously, the local directory made the routing decision immediately. With this change, if the gateway lookup stalls, the runtime times out before this function can fall back to an existing local registration, causing avoidable reconnect failures during gateway slowness.
Please shorten the lookup deadline to leave time for the reply, and add a test with a stalled resolver and an existing local registration using the runtime's actual per-hop timeout.
…e runtime hop budget Keep AssignmentSnapshot.route_directory as a deprecated, unsent field so the protobuf stays compatible on this release train. Gateways advertise route_lookups on acceptance and hosts send RouteLookup only to replicas that answer it, so a mixed rollout never ends a stream on an unknown message. Bound a lookup at half the runtime's per-hop timeout so a stalled gateway still leaves time to fall back to the local registration and reply. Signed-off-by: divesh <dgude@nvidia.com>
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 2. rust-sdk — No explicit risk acceptance foundraw::proto::SandboxPolicy gains three fields, GetSandboxConfigRequest and SupervisorHello gain supported_capabilities, and supervisor_host::v1::HostAccepted gains route_lookups.
3. helm — No explicit risk acceptance foundThe chart changes its default registry from ghcr.io/nvidia to quay.io and image repositories from openshell/<component> to ai-openshell/<component>, including under existing registry overrides.
4. helm — No explicit risk acceptance foundRenaming the chart from helm-chart to openshell changes generated resource names and selector labels for existing releases with nameOverride set to an empty string.
Review details
Advisory review; publication gates are unchanged. |
Summary
Supervisor updates no longer carry the cluster-wide route list. A shared supervisor asks the gateway for a route's owner only when a sandbox runtime reaches it for a route it doesn't own.
How it works
What the gateway sends supervisor A in each update. A gateway can own as many sandboxes as its Helm values allow (
maxMembersPerGateway×maxInstancesPerMember); the only hard cap is 131,072 across the pool. This PR changes only the message each supervisor receives.flowchart LR subgraph Before G1[Gateway] -- "A's sandboxes + every route in the pool<br/>(grows with the pool, up to 131,072)" --> S1[Supervisor A] end subgraph After G2[Gateway] -- "A's sandboxes only<br/>(up to maxInstancesPerMember: default 128, max 1024)" --> S2[Supervisor A] endWhen a sandbox runtime reaches a supervisor that doesn't own it:
Related Issue
Closes #5783
Changes
AssignmentSnapshot.route_directory(kept in the proto as deprecated, so the protobuf stays compatible). A member's update now holds only its own sandboxes, so its size no longer grows with the pool.RouteLookup/RouteOwneron the existing Attach stream. The gateway answers from its in-memory pool view, with no DB read.HostAccepted.route_lookups; a supervisor sends lookups only to a gateway that sets it, so a mixed-version rollout never ends a stream on an unknown message.Testing
cargo clippy -D warningson sandbox-backend, supervisor-control, supervisor, server, sandboxroute_lookupsbuf breakingagainstmainpassesmise run proto:lintChecklist