Skip to main content

Module host_mesh

Module host_mesh 

Source
Expand description

Host-mesh attach and lifecycle.

§Host-mesh invariants (HM-*)

These are the load-bearing semantic contracts of HostMesh::attach() and HostMeshRef::push_config(). They describe what callers may rely on; they do not pin specific mechanisms (the current implementation chooses a particular send path, error taxonomy, and timeout shape — those are not invariants and may evolve).

  • HM-1 (attach-config-complete). If HostMesh::attach() returns Ok, every attached host has installed the client’s propagatable config snapshot.

  • HM-2 (attach-config-fails-closed). If config push fails on any attached host, HostMesh::attach() returns Err. It must not return a partially-configured mesh as success.

  • HM-3 (in-band-request-failure-surface). Attach-time config-push request failure must surface through attach() / push_config() as a structured error. It must not bypass that result path by returning the outbound request on the caller’s Undeliverable<MessageEnvelope> channel. The invariant names a specific prohibited bypass; what a caller chooses to do with the returned Err (escalate, retry, abort) is outside scope. Cross-cutting: depends on hyperactor undeliverable semantics in hyperactor::reference and hyperactor::actor; the invariant still belongs here because the attach contract is owned here.

  • HM-4 (host-scoped-error-reporting). Config-push failure reported from push_config() identifies the failing host(s) individually, so callers can act per-host. The contract commits to per-host identity; the failure-mode taxonomy carried alongside it (the ConfigPushFailure variant set) is implementation detail and may evolve without changing the contract.

Re-exports§

pub use crate::host_mesh::host_agent::HostAgent;

Modules§

host_agent
The mesh agent actor that manages a host.

Structs§

ConfigPushError
Aggregated attach() config-push failure surface — one entry per host that didn’t acknowledge installation.
HostMesh
An owned mesh of hosts.
HostMeshRef
A non-owning reference to a mesh of hosts.
HostMeshShutdownGuard
Wrapper around HostMesh that runs shutdown on Drop.
HostRef
A reference to a single host.

Enums§

ConfigPushFailure
Per-host failure modes for the attach-time config push.
HostMeshRefParseError
The type of error occuring during HostMeshRef parsing.

Constants§

PROC_MESH_CONTROLLER_NAME
Actor name for ProcMeshController when spawned as a named child.

Statics§

GET_PROC_STATE_MAX_IDLE
The maximum idle time between updates while querying host meshes for their proc states.
PROC_SPAWN_MAX_IDLE
The maximum idle time between updates while spawning proc meshes.
PROC_STOP_MAX_IDLE
The maximum idle time between updates while stopping proc meshes.

Functions§

spawn_admin
Spawn a MeshAdminAgent that aggregates hosts from multiple meshes.

Type Aliases§

PerRankBootstrapFn
A function that produces a per-rank BootstrapCommand, called once per proc during spawn with that proc’s view::Point over the combined host_extent ⊕ per_host extent. Returning an error aborts the spawn with that error surfaced as a configuration failure.