Skip to content

Commit

Permalink
Merge pull request #362 from stuggi/improve_index
Browse files Browse the repository at this point in the history
Make sure to log error in findObjectsForSrc()
  • Loading branch information
openshift-merge-bot[bot] authored Oct 14, 2024
2 parents c2b28d2 + 43765a2 commit d623521
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion controllers/ovncontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ func (r *OVNControllerReconciler) findObjectsForSrc(ctx context.Context, src cli
}
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
return requests
}

for _, item := range crList.Items {
Expand Down
3 changes: 2 additions & 1 deletion controllers/ovndbcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ func (r *OVNDBClusterReconciler) findObjectsForSrc(ctx context.Context, src clie
}
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
return requests
}

for _, item := range crList.Items {
Expand Down
3 changes: 2 additions & 1 deletion controllers/ovnnorthd_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ func (r *OVNNorthdReconciler) findObjectsForSrc(ctx context.Context, src client.
}
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
return requests
}

for _, item := range crList.Items {
Expand Down

0 comments on commit d623521

Please sign in to comment.