Skip to content
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

Updated sidecar to not require VolumeSnapshotClass for snapshot deletion #287

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

huffmanca
Copy link
Contributor

What type of PR is this?
/kind flake

What this PR does / why we need it:
Allows the sidecar to delete VolumeSnapshots if the VolumeSnapshotClass has already been deleted. This PR is a followup to #275 for the sidecar.

Which issue(s) this PR fixes:
Fixes #264

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Allows the sidecar to delete volume snapshots if the volume snapshot class is not found.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/flake Categorizes issue or PR as related to a flaky test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 7, 2020
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 7, 2020
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 7, 2020
@huffmanca
Copy link
Contributor Author

@xing-yang ,

I'm submitting this as a WIP, as I can't get it to fully past the delete tests. There's an issue with the expected number of delete events on these tests, where we're expecting 0 events, and the array of events is nil. I haven't been able to trace why this is the cause. Would you have any thoughts?

@xing-yang
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 8, 2020
@xing-yang
Copy link
Collaborator

@huffmanca I think it is because this PR allows snapshot to be deleted when snapshot class is not found. Check if those failed tests have a snapshot class that is not found.

@humblec
Copy link
Contributor

humblec commented May 3, 2020

@xing-yang is it valid to delete volumesnapshot if subjected SC not found? at times, we may require some params or data from SC to perform delete operation, Isnt it ?

@xing-yang
Copy link
Collaborator

@xing-yang is it valid to delete volumesnapshot if subjected SC not found? at times, we may require some params or data from SC to perform delete operation, Isnt it ?

Yes, it is valid to delete snapshot even when SC is already deleted. We only need to have secrets when deleting the snapshot which is already added as annotation to the content.

@xing-yang
Copy link
Collaborator

@huffmanca can you rebase your PR and see if you still have the issue with unit tests?

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 27, 2020

@huffmanca: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-csi-external-snapshotter-1-15-on-kubernetes-1-15 3efec76 link /test pull-kubernetes-csi-external-snapshotter-1-15-on-kubernetes-1-15

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Copy link
Collaborator

@xing-yang xing-yang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huffmanca, I added comments to the unit tests. It should pass after you've addressed my comments.

pkg/sidecar-controller/snapshot_delete_test.go Outdated Show resolved Hide resolved
pkg/sidecar-controller/snapshot_delete_test.go Outdated Show resolved Hide resolved
pkg/sidecar-controller/snapshot_delete_test.go Outdated Show resolved Hide resolved
pkg/sidecar-controller/snapshot_delete_test.go Outdated Show resolved Hide resolved
@huffmanca huffmanca changed the title WIP: Updated sidecar to not require VolumeSnapshotClass for snapshot deletion Updated sidecar to not require VolumeSnapshotClass for snapshot deletion Jun 4, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 4, 2020
@huffmanca
Copy link
Contributor Author

@xing-yang ,

I've updated the PR, and the tests pass after following your instructions. I also rebased this PR, as there's been some time since the initial submission.

With that being said, I haven't been able to reproduce the issue in the sidecar, and I'm hesitant about merging it blindly. It seems identical to the fix in the snapshot-controller, which is why it's been submitted.

@xing-yang
Copy link
Collaborator

@huffmanca It is a timing issue, so I think whether it happens depends on the environment. Your fix looks right to me.

@xing-yang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2020
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2020
@k8s-ci-robot k8s-ci-robot merged commit 7c2cd67 into kubernetes-csi:master Jun 5, 2020
k8s-ci-robot added a commit that referenced this pull request Feb 11, 2021
Cherry pick of #287: Updated sidecar to not require VolumeSnapshotClass for snapshot deletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VolumeSnapshot resources still remain after pass the E2E test
4 participants