-
Notifications
You must be signed in to change notification settings - Fork 404
Allows VolumeSnapshot to be deleted if the class isn't found #275
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
Allows VolumeSnapshot to be deleted if the class isn't found #275
Conversation
|
Hi @huffmanca. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
d751462 to
9745d48
Compare
|
@xing-yang - this should be ready for review |
9745d48 to
3bb0af2
Compare
|
I also removed the second commit and submitted it as a separate PR in #278 . |
3bb0af2 to
e0cbed7
Compare
e0cbed7 to
3ade34d
Compare
43cafda to
f91c359
Compare
f91c359 to
c88f93b
Compare
| if err == nil || errors.IsNotFound(err) { | ||
| // We should still handle deletion events even if the VolumeSnapshotClass | ||
| // is not found in the cluster | ||
| klog.V(5).Infof("deleting snapshot %q ; snapshot has either been scheduled for deletion, or snapshotClass has already been removed", key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "snapshot has either been scheduled for deletion" can be removed as both condition will go thru "deleteSnapshot".
Suggest change to the following:
deleting snapshot %q; snapshotClass may have already been removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been updated to use the suggested message.
c88f93b to
4791370
Compare
| // If the VolumeSnapshotClass is not found, we still need to process an update | ||
| // so that syncSnapshot can delete the snapshot, should it still exist in the | ||
| // cluster after it's been removed from the informer cache | ||
| klog.V(5).Infof("passed checkAndUpdateSnapshotClass for snapshot %q, or snapshot needs to be deleted and snapshotClass doesn't exist", key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest change to the following:
updating snapshot %q; snapshotClass may have already been removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been changed to use the suggested message.
4791370 to
91a55c0
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: huffmanca, xing-yang 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 |
74e066a82 Merge pull request kubernetes-csi#279 from Aishwarya-Hebbar/update-csi-prow-version 6f236be7d Update CSI prow driver version to v1.17.0 0ee55894b Merge pull request kubernetes-csi#280 from xing-yang/update_go_1.24.4 9af101534 update to go 1.24.4 f5fec3e36 Merge pull request kubernetes-csi#275 from chrishenzie/emeritus c5d285db8 Remove chrishenzie from kubernetes-csi-reviewers 0a435bf98 Merge pull request kubernetes-csi#274 from andyzhangx/patch-5 cd7b4bba3 Bump golang to 1.24.2 to fix CVE-2025-22871 701dc34bc Merge pull request kubernetes-csi#273 from andyzhangx/patch-4 aeebd30e8 Bump golang to 1.24.0 f277d561f Merge pull request kubernetes-csi#270 from carlory/update-kind-version 6dcb96a51 update default kind version to v0.25.0 git-subtree-dir: release-tools git-subtree-split: 74e066a82d2ea14a68ff37f0e02ddc34619bbccd
74e066a82 Merge pull request kubernetes-csi#279 from Aishwarya-Hebbar/update-csi-prow-version 6f236be7d Update CSI prow driver version to v1.17.0 0ee55894b Merge pull request kubernetes-csi#280 from xing-yang/update_go_1.24.4 9af101534 update to go 1.24.4 f5fec3e36 Merge pull request kubernetes-csi#275 from chrishenzie/emeritus c5d285db8 Remove chrishenzie from kubernetes-csi-reviewers 0a435bf98 Merge pull request kubernetes-csi#274 from andyzhangx/patch-5 cd7b4bba3 Bump golang to 1.24.2 to fix CVE-2025-22871 701dc34bc Merge pull request kubernetes-csi#273 from andyzhangx/patch-4 aeebd30e8 Bump golang to 1.24.0 f277d561f Merge pull request kubernetes-csi#270 from carlory/update-kind-version 6dcb96a51 update default kind version to v0.25.0 git-subtree-dir: release-tools git-subtree-split: 74e066a82d2ea14a68ff37f0e02ddc34619bbccd
5f38a9075 Merge pull request kubernetes-csi#282 from rhrmo/update-go-1.24.6 579f62421 Update go to 1.24.6 74e066a82 Merge pull request kubernetes-csi#279 from Aishwarya-Hebbar/update-csi-prow-version 6f236be7d Update CSI prow driver version to v1.17.0 0ee55894b Merge pull request kubernetes-csi#280 from xing-yang/update_go_1.24.4 9af101534 update to go 1.24.4 f5fec3e36 Merge pull request kubernetes-csi#275 from chrishenzie/emeritus c5d285db8 Remove chrishenzie from kubernetes-csi-reviewers git-subtree-dir: release-tools git-subtree-split: 5f38a907597230563f5e2213aea116acdd9d86bc
What type of PR is this?
/kind flake
What this PR does / why we need it:
There were some instances where a namespace remained after a test due to a VolumeSnapshot persisted after the associated objects (VolumeSnapshotContent/PVC) and VolumeSnapshotClass had been deleted. If the cluster entered into this state, then the namespace would remain until the VolumeSnapshot was manually removed.
This PR allows a VolumeSnapshot that's been scheduled for deletion to be successfully deleted if the VolumeSnapshotClass cannot be found.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Does this PR introduce a user-facing change?: