Repository navigation
Conversation
Propose four supervisor deployment models (per workspace, per node, per sandbox, per gateway) with shared safety rules for fenced recovery, and set out how to compare them and choose one. Refs NVIDIA#4311. Signed-off-by: divesh <dgude@nvidia.com>
65bc1ef to
21a0f97
Compare
|
Thanks for opening this. Some input from the Agent Substrate side, mostly on one case the RFC doesn't cover yet: a backend suspending a sandbox on purpose. Suspended sandboxes On Agent Substrate an idle sandbox is suspended and uses no compute, and it can resume later, possibly on a different node. The RFC's resume path is about replacing a failed supervisor. For a backend-initiated suspend, we'd hope for the following:
Placement Our lean is a pool that isn't tied to nodes: one HA deployment per install, or per gateway group, scaled horizontally, with sessions assignable to any replica. Per node fits a suspend-capable backend poorly, because sandboxes move between nodes on resume and many nodes would mostly hold sleeping sandboxes. Per workspace tends to split capacity. Capacity If suspended sandboxes release their sessions, the number to size supervisors for on a backend like ours is active sandboxes, not total sandboxes. Happy to walk through what we saw in our prototype, and to review as the comparison of the four models takes shape. |
|
will take this into consideration and update the RFC, thanks @mayawang |
Rewrite the proposal in plain language and shorten it. Address review notes on defaults, readiness, relay caps, the network fence, node drain, the driver reconciler, and token fencing on takeover. Signed-off-by: divesh <dgude@nvidia.com>
|
Thanks @mayawang. Suspend isn't supported in OpenShell yet, so I've listed backend-initiated suspend (#4352) as a separate non-goal, but the design leaves scope for it as a planned release plus a fresh assignment on wake. I also noted that per-node fits poorly with backends that move sandboxes, and that capacity should be sized by active sandboxes. |
Trim the proposal without dropping content. Note backend-initiated suspend as a separate task, per-node fit with backends that move sandboxes, and sizing by active sandboxes. Signed-off-by: divesh <dgude@nvidia.com>
There was a problem hiding this comment.
Almost there, thanks for the quick turnaround. 9 of the 13 threads are fixed in the text, so go ahead and resolve those.
Two small things before I approve:
- L147, see inline.
- The four items you're leaving for the prototype (per-node binding, per-replica vs per-sandbox lease, launch material delivery, lease renewal path) aren't in the RFC yet. Could you list them under Open questions so they don't get lost?
Also I think this would be a feature behind a k8s feature gate, maybe worth documenting.
Signed-off-by: Dhiraj Bokde <dbokde@nvidia.com>
docs(rfc): define sandbox workload identity for shared supervisors
|
will be addressing the comments today, was not online yesterday |
3b9639f to
cd5e6ae
Compare
Signed-off-by: divesh <dgude@nvidia.com>
cd5e6ae to
c3d6029
Compare
Signed-off-by: Dhiraj Bokde <dbokde@nvidia.com>
…y/dhirajsb docs(rfc): clarify workload identity for shared supervisors
|
Section 5 proposal, to help close it out. The problem: sharing supervisors breaks the 1:1 pod topology that per-sandbox identity rides on today. Every acquisition option discussed so far fails one of three ways: a Workload API socket in the sandbox pod is reachable by the agent (same UID, same mount namespace); the Delegated Identity API is node-scoped; the Broker API, which does per-pod references, is still experimental. The proposal: the gateway issues per-sandbox identity. The supervisor requests a short-lived, audience-bound JWT with sub = spiffe:///sandbox/ over its existing authenticated gateway session, and injects it post-chain the way token grant injection works today. The gateway mints only when the requesting supervisor currently owns the sandbox (assignment plus ownership epoch, the section 3 state), the audience matches a provider profile attached to that sandbox, and the run is active. sub is bound to the sandbox, run, and epoch at mint and at use, and everything fails closed. I would write section 5 as those two contracts (what providers verify, what the gateway enforces) with this as the reference acquisition mechanism, so the backend stays swappable: the SPIFFE Broker API is the SPIRE-native acquisition path once it leaves experimental. SPIRE keeps attesting components (gateway and supervisor pods); per-sandbox identity is gateway-derived inside the spiffe://openshell/sandbox/ namespace already reserved in sandbox_jwt.rs. Kata needs nothing special, since no identity material enters the guest. Per-sandbox X.509 mTLS to third parties stays out of scope. One thing to sanity-check: providers that validate the client assertion against a SPIRE-issued JWKS would repoint at the gateway JWKS. I do not expect that to be a blocker, but it is the interop risk. @FrostGod @dhirajsb does this work for you as the section 5 shape? |
I'm not opposed to that necessarily, but it is quite a big change in behaviour. Rather than trusting SPIRE, the token service now needs to trust the gateway and the gateway would need to provide appropriate JWKS endpoint. A setup that configured Keycloak to accept SPIRE minted SVIDs would need to be re-configured to target the gateway itself instead of SPIRE. Again, I'm not saying this should invalidate the proposal. |
Fair, and @dhirajsb says the same in the thread: it changes who providers trust, and that's too big a change to ride along with shared supervisors. I'm dropping it. I've suggested a narrower scope for section 5 in the L179 thread. |
Signed-off-by: divesh <dgude@nvidia.com>
|
LGTM |
|
Sandbox-specific workload identity, issued by our trusted SPIFFE provider, is a must-have requirement for NVIDIA AI Factory’s adoption of OpenShell. We also need shared supervisors to overcome the scaling limits of a dedicated supervisor Pod per sandbox; falling back to dedicated supervisors leaves that requirement unmet. A shared-supervisor mode without sandbox-specific workload identity would therefore not be usable for our deployment. #4732, which proposes gateway-managed acquisition of distinct SPIRE-issued sandbox identities, is a possible solution, subject to validating its delegation boundaries and operation at scale. |
This requirement will be addressed. For now, this is only an RFC/proposal; the implementation is being tracked in #4732, where the discussion is ongoing. I suggest we avoid blocking this RFC and amend it later, once the approach is finalized through the PR review process. The reason we’d like to merge it now is that implementation has already started, and prototyping is actively underway. |
|
/ok to test 4629c19 |
Summary
Adds RFC 0018, which proposes four ways to deploy supervisors: per workspace, per node, per sandbox, and per gateway. It sets out one shared set of safety rules for replacing a failed supervisor (fencing), and a plan to compare the four models and choose one.
Related Issue
Refs #4311. This PR only adds the RFC and changes no code. It also builds on #3661 and #2385.
Changes
rfc/0018-multi-sandbox-ha-supervisors/README.mdwith goals, the four proposed models, and the shared rules (fenced recovery, ownership epoch, leases).Testing
Docs-only change, so there are no unit or E2E tests. The RFC links, the Mermaid diagrams, and the headings are checked by eye. The full
mise run pre-commithas not completed on this branch: the first run failed on a localuvenvironment error unrelated to the RFC, and the rerun did not start.Checklist