Skip to content

ateworker: reuse a completed checkpoint only on the same boot - #3213

Merged
Dmitry Berkovich (dberkov) merged 3 commits into
agent-substrate:mainfrom
chw120:checkpoint-reuse-same-boot
Oct 28, 2026
Merged

Dmitry Berkovich (dberkov) merged 3 commits into
agent-substrate:mainfrom
chw120:checkpoint-reuse-same-boot

Conversation

@chw120

Copy link
Copy Markdown
Collaborator

Follow-up to #3015. Part of #2836.

A retried CheckpointWorkload reuses the worker's record of a completed checkpoint. The worker does not sync the snapshot files, so after a node reboot the record and the files can survive with torn contents. The retry then reused them, and atelet stamped the local snapshot with the new boot ID, so its pre-reboot check no longer catches them.

  • RecordCheckpoint records the node's boot ID, and ReuseCheckpoint skips a record from another boot. After a reboot, the retry fails instead of committing files that may be torn.
  • atelet's boot ID reader moves to internal/bootid so the workers can use it.

TestRecordAndReuseCheckpoint covers a record from another boot.

AI use: AI-assisted. I reviewed and tested it.

  • Tests pass

Comment thread cmd/ateworker-gvisor/main.go Resolved
The worker does not sync the snapshot files before it records a
completed checkpoint. After a node reboot, the files and the record can
survive while the file contents are torn. A retry then reused them, and
atelet stamped its local snapshot with the new boot ID, so nothing
caught the torn files.

RecordCheckpoint now records the node's boot ID, and ReuseCheckpoint
skips a record from another boot. The boot ID reader moves from atelet
to internal/bootid so the workers can use it.

Signed-off-by: Chenyi Wang <[email protected]>
A node without a readable boot ID now fails before the worker opens its
socket or starts the tunnel.

Signed-off-by: Chenyi Wang <[email protected]>
@chw120

Copy link
Copy Markdown
Collaborator Author

cc: Michelle Au (@msau42)

Signed-off-by: Chenyi Wang <[email protected]>
@dberkov
Dmitry Berkovich (dberkov) added this pull request to the merge queue Oct 28, 2026
Merged via the queue into agent-substrate:main with commit 34cce1e Oct 28, 2026
5 checks passed
@chw120
Chenyi Wang (chw120) deleted the checkpoint-reuse-same-boot branch October 28, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/gvisor area/microVM area/node area/reliability area/storage kind/bug Something isn't working / bugfixes milestone-ack prio/P0 Highest priority / required for next milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants