From 9e0b63581929f00468eae43efab51ebf6b8ec908 Mon Sep 17 00:00:00 2001 From: riya-singhal31 Date: Thu, 29 Sep 2022 12:30:01 +0530 Subject: [PATCH] fix: can not delete lvmcluster with wrong disks path in CR in this commit we are updating the node status when lvmd config file does not exists. Signed-off-by: riya-singhal31 --- pkg/vgmanager/vgmanager_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/vgmanager/vgmanager_controller.go b/pkg/vgmanager/vgmanager_controller.go index 4701b1793..935acb914 100644 --- a/pkg/vgmanager/vgmanager_controller.go +++ b/pkg/vgmanager/vgmanager_controller.go @@ -324,6 +324,10 @@ func (r *VGReconciler) processDelete(ctx context.Context, volumeGroup *lvmv1alph } if lvmdConfig == nil { r.Log.Info("lvmd config file does not exist") + if statuserr := r.updateStatus(ctx, nil); statuserr != nil { + r.Log.Error(statuserr, "failed to update status", "VGName", volumeGroup.Name) + return statuserr + } return nil } // To avoid having to iterate through device classes multiple times, map from name to config index