diff --git a/controllers/ironicapi_controller.go b/controllers/ironicapi_controller.go index 3bfe4a50..de433a04 100644 --- a/controllers/ironicapi_controller.go +++ b/controllers/ironicapi_controller.go @@ -330,7 +330,8 @@ func (r *IronicAPIReconciler) findObjectsForSrc(ctx context.Context, src client. } err := r.List(ctx, crList, listOps) if err != nil { - return []reconcile.Request{} + l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) + return requests } for _, item := range crList.Items { diff --git a/controllers/ironicconductor_controller.go b/controllers/ironicconductor_controller.go index 5fb42640..846c43e5 100644 --- a/controllers/ironicconductor_controller.go +++ b/controllers/ironicconductor_controller.go @@ -288,7 +288,8 @@ func (r *IronicConductorReconciler) findObjectsForSrc(ctx context.Context, src c } err := r.List(ctx, crList, listOps) if err != nil { - return []reconcile.Request{} + l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) + return requests } for _, item := range crList.Items { diff --git a/controllers/ironicinspector_controller.go b/controllers/ironicinspector_controller.go index 9cc0b5a8..5e3e5fcd 100644 --- a/controllers/ironicinspector_controller.go +++ b/controllers/ironicinspector_controller.go @@ -370,7 +370,8 @@ func (r *IronicInspectorReconciler) findObjectsForSrc(ctx context.Context, src c } err := r.List(ctx, crList, listOps) if err != nil { - return []reconcile.Request{} + l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) + return requests } for _, item := range crList.Items { diff --git a/controllers/ironicneutronagent_controller.go b/controllers/ironicneutronagent_controller.go index f38eef61..a5105953 100644 --- a/controllers/ironicneutronagent_controller.go +++ b/controllers/ironicneutronagent_controller.go @@ -268,7 +268,8 @@ func (r *IronicNeutronAgentReconciler) findObjectsForSrc(ctx context.Context, sr } err := r.List(ctx, crList, listOps) if err != nil { - return []reconcile.Request{} + l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) + return requests } for _, item := range crList.Items {