Stamp delete-protected marker on managed VS adoption and VSC create p…#67
Open
kneumoin wants to merge 2 commits into
Open
Stamp delete-protected marker on managed VS adoption and VSC create p…#67kneumoin wants to merge 2 commits into
kneumoin wants to merge 2 commits into
Conversation
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.
Description
Stamp the authoritative unified-snapshot delete-protection marker
state-snapshotter.deckhouse.io/delete-protected: "true"on the CSI snapshotobjects that storage-foundation contributes to the unified snapshot tree:
VolumeSnapshotContent— the marker is put into the CREATEpayload in the VolumeCaptureRequest controller (
processSnapshotTarget),so the VSC is protected from the moment it first appears in the API.
VolumeSnapshot— the marker is stamped in the same patchthat latches domain adoption (
managed=true) in the VolumeSnapshot domaincontroller, before any graph edge is published. A vetoed VolumeSnapshot
(
managed=false) is a plain CSI snapshot, not a tree node, and isdeliberately left unprotected.
This is the storage-foundation half of the cross-repo unified-snapshot delete
protection; the normative contract and the admission enforcement (the
ValidatingAdmissionPolicy) live in
state-snapshotter(
design/delete-protection-contract.md). This PR only marks objects — itdoes not enforce anything by itself and does not change VCR
lifecycle/retry/CSI semantics.
No critical cluster components are restarted by this change.
Why do we need it, and what problem does it solve?
Objects created/adopted by storage-foundation (managed VS/VSC) are structural
nodes of a unified snapshot tree. They must never be observable in an
unprotected state: there is no ordering guarantee between a
Createand afollow-up
Patch, so stamping the marker after creation would leave a shortwindow in which the node could be deleted directly, corrupting the tree. Adding
the marker into the CREATE payload (VSC) and into the adoption-latch patch (VS)
closes that window and lets the state-snapshotter admission guard protect the
whole tree consistently once enforcement is switched to
Deny.What is the expected result?
state-snapshotter.deckhouse.io/delete-protected=trueimmediately oncreation.
…/managed=true; a vetoed (managed=false) VolumeSnapshot MUST NOT carry themarker.
data-path.
enforcement: Deny, directdeletion of these marked objects is rejected (verified there); with
Audit(default) nothing is blocked.
Checklist