Conversation
Add a finalizer to the DataVolume to prevent it from being accidentally deleted manually or by external workloads. Signed-off-by: Kelly Duong <kellyduong@google.com>
|
Hi @kellydx. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/lgtm |
|
@kellydx: The following tests failed, say
DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
/retest |
|
@kellydx: PRs from untrusted users cannot be marked as trusted with DetailsIn response to this:
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-sigs/prow repository. |
awels
left a comment
There was a problem hiding this comment.
Looks like in some cases the finalizer is not removed from the infra PVC, and this is causing a ton of tests to fail.
You should be able to reproduce the issue with doing
make cluster-up
make cluster-sync-split
./hack/run-e2e.shThis will run some of the tests and you should be able to see what is failing
| It("DeleteDataVolume should successfully remove finalizer and call delete", func() { | ||
| dataVolume := createValidDataVolume() | ||
| dataVolume.Name = "pvc-test4" | ||
| _, err := c.CreateDataVolume(context.Background(), testNamespace, dataVolume) |
There was a problem hiding this comment.
Missing Expect(err).ToNot(HaveOccurred()) this is causing one of the linter failures
| dataVolume := createValidDataVolume() | ||
| dataVolume.Name = "pvc-test5" | ||
| _, err := c.CreateDataVolume(context.Background(), testNamespace, dataVolume) | ||
| // Set up a custom client that returns an error on Patch |
There was a problem hiding this comment.
Missing Expect(err).ToNot(HaveOccurred()) this is causing a linter failure
|
Pull requests that are marked with After that period the bot marks them with the label /label needs-approver-review |
Add a finalizer to the DataVolume to prevent it from being accidentally deleted manually or by external workloads.
What this PR does / why we need it:
I encountered a scenario where some DataVolumes were accidentally deleted, leading to data loss and VMs being unable to boot. As a precaution, a DataVolume created by KVCSI should have a finalizer to prevent it from being accidentally deleted, ensuring resources are cleaned up properly.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: