Repository navigation
Bind golden snapshot warmup and publication to Actor revisions - #2554
Luomu (cloudonly) wants to merge 2 commits into
Conversation
0b708e3 to
a8e491d
Compare
|
Zoe Zhao (@zoez7) Before I redesign this draft: is a narrow follow-up worth pursuing? The concrete case and proposed shape are below. I won't change code until you confirm. Problem after #2543. Golden actors are now ordinary actors in the template's atespace, so tenants can suspend them. The reconciler publishes any completed snapshot it finds, whether or not it took that snapshot:
Scenario: a tenant calls Proposed scope
Trade-offs. A controller crash between capture and tagging costs one more warmup instead of publishing directly. An update that lands after Not covered
Tests. Controller tests with the lifecycle fake: tenant suspend during warmup, If this isn't worth the extra code, I'll close #2554 and track the gap in #2552. |
a8e491d to
e15effa
Compare
A template whose preferred fidelity is VOLUMES but that mounts no volume a snapshot can capture (durable-dir, or a CSI volume on the micro-VM class) fails at runtime on every pause and suspend. Reject it at template admission instead, in the custom validation that already checks volume references and the ROOTFS sandbox class. Document the requirement next to the ROOTFS rule in the API guide, including that an external volume's data stays on the volume rather than in the snapshot.
Warmup could outlive the Actor revision it started on, and recovery assumed that an existing durable snapshot had been approved for publication. Bind the warmup timer to the observed RUNNING Actor's UID and version, and publish only a capture completed during the current reconciliation attempt. Suspend checks the warmed revision under the actor lease. CreateTag checks the revision Suspend returned under its own lease, so an intervening lifecycle operation aborts publication rather than tagging an unapproved snapshot. Approval lives only in the reconciler's memory: an interrupted capture or failed copy resumes the existing guest state and starts another warmup, while a completed tag is recovered before retrying cleanup. Adds the server-owned warmup_actor_uid and warmup_actor_version fields to GoldenSnapshotStatus.
e15effa to
c85a6c0
Compare
Draft direction
This PR is no longer a prerequisite for #2543.
Following the review of #2543, the smaller proposal under discussion would add no public Status fields and protect only the window between snapshot capture and tag publication. Cross-reconcile warmup binding would be outside that scope.
The current diff still contains the broader implementation below, including two
GoldenSnapshotStatusfields. It has not been redesigned yet; this draft is awaiting confirmation that the smaller follow-up is worth pursuing.Current implementation
Prior validation
These records apply to the broader implementation and earlier revisions. They do not validate the proposed smaller design.
Recorded validation history
Final sync checks at
0b708e3c:Complete validation before the final main sync, at
35fbd982:CI=true: related race tests passed across 3 packages, with 461 top-level passes (2001 total test entries), no failures or skips. The PostgreSQL and Kubernetes envtest functional suites passed.GOOS=linux; Weaver and shellcheck used the repository's Docker fallback on Linux.Earlier validation before this rebase:
go test -race -count=1 ./...withCI=truepassed on Linux/amd64 with Go 1.27.1: 154 test-bearing packages and 9,065 tests, including the PostgreSQL and Kubernetes envtest functional suites.hack/verify-all.sh, ateapi/atelet/kubectl-ate builds, andtools/apitoolrace tests passed.Functional tests use a fake atelet. Root-gated tests and real gVisor/micro-VM E2E were not run.
AI assistance: Codex helped implement, review, and validate the original change; Claude Code rebased it and folded in review cleanups. Codex updated this draft's scope and dependency description.