diff options
Diffstat (limited to 'src/sandbox/kata.rs')
| -rw-r--r-- | src/sandbox/kata.rs | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/src/sandbox/kata.rs b/src/sandbox/kata.rs index c7d717f..9169f9f 100644 --- a/src/sandbox/kata.rs +++ b/src/sandbox/kata.rs @@ -1,25 +1,3 @@ -//! The kata backend: ad-hoc, TTL-bounded sandboxes provisioned by an -//! orchestrator, leased over the same agent protocol as everything else. -//! -//! This is composition, not a new protocol: a kata sandbox is a small VM that -//! boots the `sandbox-agent` image pointed at this hub, and `acquire` is -//! "ask the provisioner for a box, then wait for *that specific box* to dial -//! in". The nonce each lease generates is handed to the provisioner and comes -//! back as the agent's `agent_id`, so a stray sandbox can never be leased to -//! the wrong build, and a sandbox that never dials in is a TTL expiry — the -//! same vocabulary every other failure in this system speaks (I5). -//! -//! The payload is an agent-sandbox-style Kubernetes CR (`runtimeClass: kata`, -//! `activeDeadlineSeconds` as the TTL the orchestrator enforces). It is a pure -//! function, unit-tested; the network call that sends it is exercised only by -//! the gated live tier, which skips — with a printed note, never a silent -//! pass — wherever a cluster is absent. -//! -//! The `LocalAgentProvisioner` is the shape this tier is tested with: a real -//! `sandbox-agent` process, real rendezvous, no VM. It is to kata what the -//! loopback backend is to a clean machine — the honest stand-in that keeps -//! the interface itself under test. - use std::collections::HashMap; use std::io::BufReader; use std::net::{TcpListener, TcpStream}; @@ -218,16 +196,12 @@ impl KataBackend { /// /// A Kata backend cannot share only its listener the way the plain remote /// backend does: it routes every dial-in by the nonce in its `Hello` into a - /// map that belongs to it, so two backends on one address would each see - /// half the dial-ins and neither could complete a rendezvous. So the whole - /// backend is shared, not just the socket — which is also what makes - /// "one listener per process" true here, since binding happens exactly once - /// per distinct configuration. + /// map that belongs to it, so two backends on one address would each see half + /// the dial-ins. The whole backend is therefore shared, and binding happens + /// exactly once per distinct configuration. /// /// The key is a digest of everything that distinguishes one backend from - /// another, so the rendezvous token and the cluster bearer are not sitting - /// around in a second place, and two configurations that differ only in - /// unrelated hub settings still get their own backend. + /// another, so the tokens are not sitting around in a second place. pub fn shared_for(cfg: &Config) -> Result<Arc<KataBackend>> { let crate::config::Sandbox::AgentSandbox { api, namespace, bearer, image, listen, token, .. } = &cfg.sandbox |
