mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(zfspv): remove finalizer that is owned by ZFS-LocalPV (#303)
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 until those user finalizers are removed. Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
9888968fd7
commit
68d79d0e0b
4 changed files with 58 additions and 24 deletions
|
|
@ -134,7 +134,7 @@ func verifyMountRequest(vol *apis.ZFSVolume, mountpath string) (bool, error) {
|
|||
vol.Spec.OwnerNodeID != NodeID {
|
||||
return false, status.Error(codes.Internal, "verifyMount: volume is owned by different node")
|
||||
}
|
||||
if vol.Finalizers == nil {
|
||||
if !IsVolumeReady(vol) {
|
||||
return false, status.Error(codes.Internal, "verifyMount: volume is not ready to be mounted")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue