Skip to content

Commit

Permalink
fix: delete lvmcluster successfully when CR includes wrong path
Browse files Browse the repository at this point in the history
Lvmcluster was not deleted when CR includes wrong path, with
this commit we update the status of node when VGs are failing to create,
so that lvmcluster CR can get updated
information about VGs from lvmvolumegroupnodestatus CR.

Signed-off-by: riya-singhal31 <[email protected]>
  • Loading branch information
riya-singhal31 committed Sep 29, 2022
1 parent 282bcbc commit bbebab4
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 bbebab4

Please sign in to comment.