-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VolumeSnapshotBeingDeleted annotation to content #249
Conversation
/assign @yuxiangqian |
@yuxiangqian can you review this? |
LGTM, can you add a test case? |
I got lost in snapshot finalizers... With this PR, snapshot-controller adds annotation and exernal-snapshotter, seeing the annotation, removes the finalizer. Can the snapshot-controller remove the finalizer right away? |
This is to avoid leaking of the physical snapshot on the storage system. We want to make sure the physical snapshot is deleted from the storage system before removing the finalizer if the deletion policy is Delete. It is possible to remove finalizer from the content in the snapshot-controller if the policy is Retain, but we'd like to keep the content finalizer removal logic in one place which is the sidecar external-snapshotter. |
Ack |
@yuxiangqian Unit test added. PTAL. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xing-yang, yuxiangqian The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@xing-yang how did I add the annotation? or snapshot-controller adds the annotation, what config should I do to make it happen? |
@leshibily This annotation is added internally by the snapshot-controller. You should not be adding it manually. Also it will be removed by the snapshot-controller after the snapshot is deleted from the storage system. |
@xing-yang I am currently running on 6.0.1 and still facing issues with volumesnapshotcontents not being deleted. I have verified that the code from the commit is there and when I remove the finalizer they delete fine. Anything I can check in the annotations to verify that everything is correct or is there another issue open I can reference? |
@DSO-TB Can you open an issue, describe your testing steps and provide logs? |
dc4d0ae Merge pull request kubernetes-csi#249 from jsafrane/use-go-version e681b17 Use .go-version to get Kubernetes go version git-subtree-dir: release-tools git-subtree-split: dc4d0ae
dc4d0ae Merge pull request kubernetes-csi#249 from jsafrane/use-go-version e681b17 Use .go-version to get Kubernetes go version git-subtree-dir: release-tools git-subtree-split: dc4d0ae
Use .go-version to get Kubernetes go version
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds VolumeSnapshotBeingDeleted annotation to the VolumeSnapshotContent object before the finalizers on the VolumeSnapshot object is removed. This is to make sure that the annotation is on the Content before VolumeSnapshot object is removed from the API server.
Which issue(s) this PR fixes:
Fixes #248
Special notes for your reviewer:
Does this PR introduce a user-facing change?: