Skip to content

Snapshots: record the Hardware of the worker that captured them #2249

Closed

Description

@shrutiyam-glitch

ExternalSnapshot and LocalSnapshot record only the URI/name, scope, and template UID. The scheduler cannot match a snapshot to a worker without knowing which hardware it was taken on.

Proposal

message ExternalSnapshot {
  string snapshot_uri = 1;
  SnapshotContentScope content_scope = 2;   // becomes SnapshotScope under #2102
  string actor_template_uid = 3;
  // Hardware the snapshot was captured on.
  // +k8s:optional
  Hardware hardware = 4;
}
message LocalSnapshot {
  repeated string node_vms_with_local_snapshots = 1;
  string snapshot_name = 2;
  SnapshotContentScope content_scope = 3;
  // +k8s:optional
  Hardware hardware = 4;
}

The control plane copies the Hardware stamp from the assigned Worker's recorded WorkerStatus.hardware when the pause or suspend workflow captures the snapshot. Stamping LocalSnapshot.hardware at pause time ensures that a subsequent paused-origin suspend (isPausedOriginSuspend in workflow_suspend.go, where
WorkerAssignment was already cleared by PauseActor) can propagate LocalSnapshot.hardware onto the promoted ExternalSnapshot. That keeps the stamp identical to what placement matches against and needs no new atelet response fields.

Activity

  1. added this to the M3 milestone on Oct 6, 2026
  2. shrutiyam-glitch commented on Oct 14, 2026

    @shrutiyam-glitch
    CollaboratorAuthor

    Updating the issue after the recent API changes (#2289) and re-design in #2348

    Part of #2246 (and #2069).

    Problem

    A memory checkpoint (SNAPSHOT_FIDELITY_MEMORY) is only restorable on a worker whose sandbox class, host hardware, and runtime assets match the environment that produced the checkpoint. While workers now self-report their default_runtime and restorable_runtimes during registration (#2247), snapshots and active actor assignments do not yet record which SandboxRuntime an actor is running under or which runtime produced a given snapshot.

    Additionally, during a rolling runtime upgrade, a worker may update its default_runtime to a newer version (v2) while existing actors on that worker continue running under an older version (v1 in restorable_runtimes). Reading a worker's live default_runtime at checkpoint time would mis-stamp snapshots taken from those already-running v1 actors as v2.

    Proposal

    Track the SandboxRuntime across the actor lifecycle by pinning it on the actor's worker assignment when the actor starts or resumes, and propagating that stamp to every snapshot derived from it:

    1. Pin the active runtime on WorkerAssignment:
      When an actor is placed on a worker during ResumeActor, record the specific SandboxRuntime serving that actor on WorkerAssignment.sandbox_runtime (either the worker's default_runtime on a cold start / fallback, or the specific entry from default_runtime / restorable_runtimes that matched the snapshot being restored).
    2. Stamp checkpoints from the assignment:
      • Pause (PauseActor): Stamp the node-local checkpoint's Snapshot.sandbox_runtime from WorkerAssignment.sandbox_runtime.
      • Suspend from RUNNING (SuspendActor): Stamp the durable snapshot's Snapshot.sandbox_runtime from WorkerAssignment.sandbox_runtime.
      • Suspend from PAUSED (SuspendActor): When uploading a node-local pause checkpoint after the worker has already been released, preserve the Snapshot.sandbox_runtime already recorded on the local pause snapshot.
    3. Propagate stamps across tags and seeded actors:
      • Tagging (CreateTag): Copy the source actor snapshot's sandbox_runtime onto the tag's snapshot.
      • Seeding (CreateActor): Preserve Snapshot.sandbox_runtime when initializing an actor from a user source_tag or a template's golden snapshot.

    cc: Zoe Zhao (@zoez7)

  3. added a commit that references this issue on Oct 14, 2026
    fd83041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions