diff --git a/controllers/ironic_controller.go b/controllers/ironic_controller.go index 2f9db3cd..c81609fe 100644 --- a/controllers/ironic_controller.go +++ b/controllers/ironic_controller.go @@ -320,12 +320,13 @@ func (r *IronicReconciler) reconcileNormal(ctx context.Context, instance *ironic ospSecret, hash, err := oko_secret.GetSecret(ctx, helper, instance.Spec.Secret, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("OpenStack secret %s not found", instance.Spec.Secret)) instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("OpenStack secret %s not found", instance.Spec.Secret) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, diff --git a/controllers/ironicapi_controller.go b/controllers/ironicapi_controller.go index 6a440111..9ae2cf3a 100644 --- a/controllers/ironicapi_controller.go +++ b/controllers/ironicapi_controller.go @@ -627,12 +627,13 @@ func (r *IronicAPIReconciler) reconcileNormal(ctx context.Context, instance *iro ospSecret, hash, err := secret.GetSecret(ctx, helper, instance.Spec.Secret, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("OpenStack secret %s not found", instance.Spec.Secret)) instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("OpenStack secret %s not found", instance.Spec.Secret) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, @@ -652,12 +653,13 @@ func (r *IronicAPIReconciler) reconcileNormal(ctx context.Context, instance *iro transportURLSecret, hash, err := secret.GetSecret(ctx, helper, instance.Spec.TransportURLSecret, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("TransportURL secret %s not found", instance.Spec.TransportURLSecret)) instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("TransportURL secret %s not found", instance.Spec.TransportURLSecret) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, @@ -775,13 +777,14 @@ func (r *IronicAPIReconciler) reconcileNormal(ctx context.Context, instance *iro _, err := nad.GetNADWithName(ctx, helper, netAtt, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("network-attachment-definition %s not found", netAtt)) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.NetworkAttachmentsReadyWaitingMessage, netAtt)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("network-attachment-definition %s not found", netAtt) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, diff --git a/controllers/ironicconductor_controller.go b/controllers/ironicconductor_controller.go index 129c54a8..61413a76 100644 --- a/controllers/ironicconductor_controller.go +++ b/controllers/ironicconductor_controller.go @@ -464,12 +464,13 @@ func (r *IronicConductorReconciler) reconcileNormal(ctx context.Context, instanc ospSecret, hash, err := secret.GetSecret(ctx, helper, instance.Spec.Secret, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("OpenStack secret %s not found", instance.Spec.Secret)) instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("OpenStack secret %s not found", instance.Spec.Secret) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, @@ -489,12 +490,13 @@ func (r *IronicConductorReconciler) reconcileNormal(ctx context.Context, instanc transportURLSecret, hash, err := secret.GetSecret(ctx, helper, instance.Spec.TransportURLSecret, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("TransportURL secret %s not found", instance.Spec.TransportURLSecret)) instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("TransportURL secret %s not found", instance.Spec.TransportURLSecret) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, @@ -620,13 +622,14 @@ func (r *IronicConductorReconciler) reconcileNormal(ctx context.Context, instanc _, err := nad.GetNADWithName(ctx, helper, netAtt, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("network-attachment-definition %s not found", netAtt)) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.NetworkAttachmentsReadyWaitingMessage, netAtt)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("network-attachment-definition %s not found", netAtt) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, diff --git a/controllers/ironicinspector_controller.go b/controllers/ironicinspector_controller.go index 53130d30..69f1f227 100644 --- a/controllers/ironicinspector_controller.go +++ b/controllers/ironicinspector_controller.go @@ -474,15 +474,14 @@ func (r *IronicInspectorReconciler) reconcileConfigMapsAndSecrets( instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + log.FromContext(ctx).Info(fmt.Sprintf("OpenStack secret %s not found", instance.Spec.Secret)) instance.Status.Conditions.Set( condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, "", - fmt.Errorf("OpenStack secret %s not found", - instance.Spec.Secret) + return ctrl.Result{RequeueAfter: time.Second * 10}, "", nil } instance.Status.Conditions.Set( condition.FalseCondition( @@ -754,13 +753,14 @@ func (r *IronicInspectorReconciler) reconcileNormal( _, err := nad.GetNADWithName(ctx, helper, netAtt, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + Log.Info(fmt.Sprintf("network-attachment-definition %s not found", netAtt)) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.NetworkAttachmentsReadyWaitingMessage, netAtt)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("network-attachment-definition %s not found", netAtt) + return ctrl.Result{RequeueAfter: time.Second * 10}, nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, diff --git a/controllers/ironicneutronagent_controller.go b/controllers/ironicneutronagent_controller.go index e4540cb6..4707f9db 100644 --- a/controllers/ironicneutronagent_controller.go +++ b/controllers/ironicneutronagent_controller.go @@ -351,12 +351,13 @@ func (r *IronicNeutronAgentReconciler) reconcileConfigMapsAndSecrets( ospSecret, hash, err := secret.GetSecret(ctx, helper, instance.Spec.Secret, instance.Namespace) if err != nil { if k8s_errors.IsNotFound(err) { + log.FromContext(ctx).Info(fmt.Sprintf("OpenStack secret %s not found", instance.Spec.Secret)) instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.RequestedReason, condition.SeverityInfo, condition.InputReadyWaitingMessage)) - return ctrl.Result{RequeueAfter: time.Second * 10}, "", fmt.Errorf("OpenStack secret %s not found", instance.Spec.Secret) + return ctrl.Result{RequeueAfter: time.Second * 10}, "", nil } instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition,