Skip to content

Commit

Permalink
Revert "refine error handling"
Browse files Browse the repository at this point in the history
This reverts commit 06607e7.

Signed-off-by: Shi, Crane <[email protected]>
  • Loading branch information
CraneShiEMC committed Jul 9, 2023
1 parent 6bf928d commit fbe1e57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/crcontrollers/storagegroup/storagegroupcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
}

storageGroup := &sgcrd.StorageGroup{}
if err := c.client.ReadCR(ctx, name, "", storageGroup); err != nil && !k8serrors.IsNotFound(err) {
log.Errorf("error in reading %s as drive or storagegroup object: %v", name, err)
if err := c.client.ReadCR(ctx, name, "", storageGroup); err != nil {
if !k8serrors.IsNotFound(err) {
log.Errorf("error in reading %s as drive or storagegroup object: %v", name, err)
}
return ctrl.Result{}, client.IgnoreNotFound(err)
}

Expand Down

0 comments on commit fbe1e57

Please sign in to comment.