Repository navigation
Closed
Copy link
Labels
retired:area:gatewayRetired; do not apply. See #5151 for item-specific migration to the current taxonomy.Retired; do not apply. See #5151 for item-specific migration to the current taxonomy.retired:area:supervisorRetired; do not apply. See #5151 for item-specific migration to the current taxonomy.Retired; do not apply. See #5151 for item-specific migration to the current taxonomy.state:acceptedA maintainer decided OpenShell should pursue this issueA maintainer decided OpenShell should pursue this issue
Milestone
Description
User Story
I run OpenShell on Kubernetes with several gateway replicas and a shared supervisor pool (supervisor_topology = "gateway"). I need each sandbox's session to sit on the same gateway as its supervisor, so the layout is a simple tree that is easier to operate and to place by topology later.
Problem Statement
A pool sandbox's session is placed on a gateway by a hash of the sandbox ID. Its supervisor attaches to whichever gateway the Service picks. The two rarely match, so one supervisor's sandboxes are spread across every gateway.
flowchart TB
subgraph Today
GA1[Gateway A] --- S1[Supervisor 1]
GB1[Gateway B]
S1 --- K1[sandbox 1] & K2[sandbox 2]
K1 -.session.-> GB1
K2 -.session.-> GA1
end
subgraph Wanted
GA2[Gateway A] --- S2[Supervisor 1]
S2 --- K3[sandbox 1] & K4[sandbox 2]
K3 -.session.-> GA2
K4 -.session.-> GA2
end
Impact / Why This Matters
- Traffic for one supervisor's sandboxes hops between gateways.
- A gateway failure affects sandboxes whose supervisor lives elsewhere.
- Placement by tenant, rack, or data center needs a single parent per sandbox.
Proposed Design
- A pool sandbox's session is served by the gateway that serves its supervisor.
- When the supervisor moves (gateway crash, restart, takeover), its sandboxes' sessions follow.
- Sandbox-to-supervisor placement and dedicated supervisors are unchanged.
Acceptance Criteria
- With 2 gateways and 2 pool supervisors, every pool sandbox's session gateway equals its supervisor's gateway.
- This still holds after a gateway crash, a supervisor crash, and a rolling restart of the gateways.
- Exec keeps working on every sandbox throughout.
Alternatives Considered
- Leave it to the hash ring: it can't know where the supervisor attached.
- Supervisors place their own sandboxes: they share one token, so the gateway must stay the authority.
Metadata
Metadata
Assignees
Labels
retired:area:gatewayRetired; do not apply. See #5151 for item-specific migration to the current taxonomy.Retired; do not apply. See #5151 for item-specific migration to the current taxonomy.retired:area:supervisorRetired; do not apply. See #5151 for item-specific migration to the current taxonomy.Retired; do not apply. See #5151 for item-specific migration to the current taxonomy.state:acceptedA maintainer decided OpenShell should pursue this issueA maintainer decided OpenShell should pursue this issue
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(supervisor): dial pool sandbox sessions to the host's gateway re…
feat(server): keep pool sandbox sessions on their supervisor's gateway (