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

feat(zfspv): remove finalizer that is owned by ZFS-LocalPV #303

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Apr 3, 2021

fixes: #302

Signed-off-by: Pawan pawan@mayadata.io

Why is this PR required? What issue does it fix?:

User might want to add extra protection on the ZFSVolume CR and wants to add finalizers on it. The current code does not allow the user to setup the user's finalizers on the ZFSVolume CR.

What this PR does?:

We set the Finalizer to nil while handling the delete event, instead,
we should try to destroy the volume when there are no user finalizers
set. User might have added his own finalizers and we should not try to destroy
the volumes util those user finalizers are removed.

Does this PR require any upgrade changes?:

PR handles upgrade scenario.

@pawanpraka1 pawanpraka1 added enhancement Add new functionality to existing feature pr/hold-review hold the review. labels Apr 3, 2021
@pawanpraka1 pawanpraka1 added this to the v1.6.0 milestone Apr 3, 2021
@pawanpraka1 pawanpraka1 removed the pr/hold-review hold the review. label Apr 5, 2021
Copy link
Member

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

@pawanpraka1 We need to make this same change in LVM localpv right?

@pawanpraka1
Copy link
Contributor Author

We need to make this same change in LVM localpv right?

@akhilerm yes, it is good to have this change in LVM LocalPV repo also.

Copy link
Member

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

LGTM

We set the Finalizer to nil while handling the delete event, instead,
we should try to destroy the volume when there are no user finalizers
set. User might have added his own finalizers and we should not try to destroy
the volumes util those user finalizers are removed.

Signed-off-by: Pawan <pawan@mayadata.io>
@akhilerm akhilerm merged commit 68d79d0 into openebs:master Apr 6, 2021
@pawanpraka1 pawanpraka1 deleted the finalizer branch April 21, 2021 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Add new functionality to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent deletion of ZFS dataset
2 participants