diff --git a/controllers/common.go b/controllers/common.go index 37e9354ee..eed81c286 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -199,6 +199,7 @@ func ensureSecret( err := reader.Get(ctx, secretName, secret) if err != nil { if k8s_errors.IsNotFound(err) { + log.FromContext(ctx).Info(fmt.Sprintf("secret %s not found", secretName)) conditionUpdater.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, @@ -207,7 +208,7 @@ func ensureSecret( return "", ctrl.Result{RequeueAfter: requeueTimeout}, *secret, - fmt.Errorf("secret %s not found", secretName) + nil } conditionUpdater.Set(condition.FalseCondition( condition.InputReadyCondition, @@ -268,13 +269,14 @@ func ensureNetworkAttachments( _, err := nad.GetNADWithName(ctx, h, netAtt, h.GetBeforeObject().GetNamespace()) if err != nil { if k8s_errors.IsNotFound(err) { + log.FromContext(ctx).Info(fmt.Sprintf("network-attachment-definition %s not found", netAtt)) conditionUpdater.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.NetworkAttachmentsReadyWaitingMessage, netAtt)) - return nadAnnotations, ctrl.Result{RequeueAfter: requeueTimeout}, fmt.Errorf("network-attachment-definition %s not found", netAtt) + return nadAnnotations, ctrl.Result{RequeueAfter: requeueTimeout}, nil } conditionUpdater.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, diff --git a/controllers/novaapi_controller.go b/controllers/novaapi_controller.go index 075d57318..4f418d3ed 100644 --- a/controllers/novaapi_controller.go +++ b/controllers/novaapi_controller.go @@ -190,7 +190,7 @@ func (r *NovaAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err } diff --git a/controllers/novacell_controller.go b/controllers/novacell_controller.go index 3e869a28c..829ef78dd 100644 --- a/controllers/novacell_controller.go +++ b/controllers/novacell_controller.go @@ -149,7 +149,7 @@ func (r *NovaCellReconciler) Reconcile(ctx context.Context, req ctrl.Request) (r &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err } diff --git a/controllers/novacompute_controller.go b/controllers/novacompute_controller.go index f1e668b5a..dcf176ec9 100644 --- a/controllers/novacompute_controller.go +++ b/controllers/novacompute_controller.go @@ -162,7 +162,7 @@ func (r *NovaComputeReconciler) Reconcile(ctx context.Context, req ctrl.Request) &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err } diff --git a/controllers/novaconductor_controller.go b/controllers/novaconductor_controller.go index 43d06b1b8..cda327e6a 100644 --- a/controllers/novaconductor_controller.go +++ b/controllers/novaconductor_controller.go @@ -186,7 +186,7 @@ func (r *NovaConductorReconciler) Reconcile(ctx context.Context, req ctrl.Reques &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err } diff --git a/controllers/novametadata_controller.go b/controllers/novametadata_controller.go index f0a2f2305..7cc67c4ab 100644 --- a/controllers/novametadata_controller.go +++ b/controllers/novametadata_controller.go @@ -183,7 +183,7 @@ func (r *NovaMetadataReconciler) Reconcile(ctx context.Context, req ctrl.Request &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err } diff --git a/controllers/novanovncproxy_controller.go b/controllers/novanovncproxy_controller.go index 86fc5c825..f4c175e3c 100644 --- a/controllers/novanovncproxy_controller.go +++ b/controllers/novanovncproxy_controller.go @@ -180,7 +180,7 @@ func (r *NovaNoVNCProxyReconciler) Reconcile(ctx context.Context, req ctrl.Reque &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err } diff --git a/controllers/novascheduler_controller.go b/controllers/novascheduler_controller.go index 39e2c46cc..792b8614e 100644 --- a/controllers/novascheduler_controller.go +++ b/controllers/novascheduler_controller.go @@ -184,7 +184,7 @@ func (r *NovaSchedulerReconciler) Reconcile(ctx context.Context, req ctrl.Reques &instance.Status.Conditions, r.RequeueTimeout, ) - if err != nil { + if (err != nil || result != ctrl.Result{}) { return result, err }