Skip to content

Commit

Permalink
fix: deletion of lvmcluster which includes wrong paths
Browse files Browse the repository at this point in the history
Deleting the lvmvolumegroup CR does not clean the VG entry in the
lvmvolumegroupnodestatus if lvmdconfig file does not exists and returns
immediately. Fix the same via updating the lvmvolumegroupnodestatus.

Signed-off-by: riya-singhal31 <[email protected]>
  • Loading branch information
riya-singhal31 committed Sep 30, 2022
1 parent 282bcbc commit d04209b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/vgmanager/vgmanager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d04209b

Please sign in to comment.