Repository navigation
Conversation
…licas (closes #5434) Signed-off-by: divesh <dgude@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-5436.docs.buildwithfern.com/openshell |
Collaborator
Author
|
/ok to test 0f34dee |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance foundUnder openshell_sdk::raw::proto::supervisor_host::v1, HostHello gains stay and host_gateway_message::Payload gains Redirect, invalidating formerly complete literals and exhaustive matches.
Review details
Advisory review; publication gates are unchanged. |
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
Shared supervisors now spread evenly across gateway replicas. A supervisor that comes in through the Service goes to the first gateway clockwise on the existing gateway ring that serves fewer than ⌈supervisors ÷ gateways⌉, and a stopping gateway hands its supervisors off the same way. Supervisors move only when they reconnect through the Service; there is no rebalancer.
Related Issue
Closes #5434
Changes
HostGatewayMessage.redirect(HostRedirect { peer_endpoint }) andHostHello.stay.stayis redirected, before any session starts, when the ring and cap place the member elsewhere.MemberView.gateway_replica).GatewayRing::first_below.stay.stayon the sticky redial (token refresh, blips) and on the Service fallback after a failed redirect, so a stale ring cannot loop it.stay.openshell_server_supervisor_hosts(supervisors per gateway) andopenshell_server_supervisor_host_instances_max(busiest supervisor's sandboxes). The second is a max rather than a per-supervisor label because member IDs are pod names, which would make the label set grow without bound.Known trade-off: nothing moves after placement, so two cases can stay uneven until supervisors restart:
Gateway rollouts and crashes, and supervisor restarts, end even.
Testing
cargo clippy -D warningsandcargo fmt --checkforopenshell-server,openshell-supervisor,openshell-supervisor-control, and the e2e crateopenshell-server, 293 inopenshell-supervisor, 12 inopenshell-supervisor-control, all pass. New tests:first_belowskips full replicas and falls back to the ownerspread_homeignores the member's own record and leaving membersstay, then falls back to the Service withstaysupervisors_spread_evenly_across_gateways(restart each supervisor, then roll the gateways, and assert one supervisor per gateway): passed 3 of 3 runspool_sessions_follow_their_supervisors_gateway: passedlosing_a_supervisor_pod_moves_its_sandboxes_without_restarting_themstops at its first host-endpoint call withpolicy_dns_trusted_gateway_unavailable, before any supervisor or gateway moves. The hand-built cluster lacks the host-gateway DNS setup the CI lane provides.Checklist