Skip to content

Commit

Permalink
Merge pull request #155 from nbalacha/fix-1
Browse files Browse the repository at this point in the history
fix: ignore LVMVolumeGroup NotFound error
  • Loading branch information
openshift-merge-robot authored Apr 18, 2022
2 parents 8ecfd77 + 650fab1 commit bdb698d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/vgmanager/vgmanager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ func (r *VGReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Re
err := r.Client.Get(ctx, req.NamespacedName, volumeGroup)
if err != nil {
r.Log.Error(err, "failed to get LVMVolumeGroup", "VGName", req.Name)
if !errors.IsNotFound(err) {
return reconcileAgain, err
if errors.IsNotFound(err) {
return ctrl.Result{}, nil
}
return ctrl.Result{}, err
return reconcileAgain, err
}
// Check if the nodeSelector matches the labels on this node
nodeMatches, err := r.matchesThisNode(ctx, volumeGroup.Spec.NodeSelector)
Expand Down

0 comments on commit bdb698d

Please sign in to comment.