Repository navigation
snapshots: stamp the pod's caller annotations on hibernate and latest pushes - #117
Merged
Merged
Conversation
… pushes Reads vm.cocoonstack.io/snapshot-annotations through cocoon-common's typed reader and passes the map to the pusher, which keeps the peer-discovery node hint last so a caller cannot override it. A malformed value is logged and the push goes ahead without caller annotations: metadata never blocks a hibernate or a delete. Pins cocoon-common to the branch commit of cocoon-common#36.
This was referenced Sep 28, 2026
CMGS
added a commit
that referenced
this pull request
Sep 28, 2026
The vm tests write a shell script and exec it at once, and most of them run in parallel. A sibling test's fork that lands while the script is still open for writing inherits that fd until its own exec, and our exec then fails with ETXTBSY (golang/go#22315). It failed CI on #117. Holding syscall.ForkLock for reading around the write keeps any fork out of that window. On Linux, 300 repetitions of the affected tests hit ETXTBSY 12 times before and 0 times in two rounds after.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Pusher.PushSnapshottakes the caller's annotations and copies them onto the pushed manifest; thecocoonstack.snapshot.from-nodepeer-discovery hint is written after them, so a caller cannot override it.update.go) and the delete-timelatestpush (snapshot.go) readvm.cocoonstack.io/snapshot-annotationsthroughmeta.ReadSnapshotAnnotationsand pass the result.Why
A business layer that creates the pod (vm-service) needs its own metadata on the snapshots vk-cocoon publishes for it (owner, lineage, manifest hash), and reads it back from the registry. cocoon-common's
PushOptions.Annotationsalready existed; the hibernate andlatestpaths had no way to feed it. The engine stays a carrier and never interprets the values.Dependency
Needs cocoonstack/cocoon-common#36.
go.modpins cocoon-common to that branch's commit (v0.3.7-0.20260928164220-c33e27e571b8); re-pin to the merge commit or tag before merging this.Evidence
snapshots/pusher_test.go: a push through a capturing registry carries the caller key, the node hint wins over a spoofed caller value, the baseimage guard is intact, and the caller's map is not mutated.make lint0 issues on linux and darwin,make fmt-checkclean,asl ./...clean on both GOOS,go test -race ./...green.