diff --git a/controllers/openstackdataplanedeployment_controller.go b/controllers/openstackdataplanedeployment_controller.go index aaaace8d1..cb03ac34b 100644 --- a/controllers/openstackdataplanedeployment_controller.go +++ b/controllers/openstackdataplanedeployment_controller.go @@ -251,7 +251,7 @@ func (r *OpenStackDataPlaneDeploymentReconciler) Reconcile(ctx context.Context, instance.Status.Conditions.MarkFalse( condition.ReadyCondition, condition.ErrorReason, - condition.SeverityWarning, + condition.SeverityError, dataplanev1.DataPlaneNodeSetErrorMessage, err.Error()) } diff --git a/controllers/openstackdataplanenodeset_controller.go b/controllers/openstackdataplanenodeset_controller.go index a9bef75cc..888e2dfc9 100644 --- a/controllers/openstackdataplanenodeset_controller.go +++ b/controllers/openstackdataplanenodeset_controller.go @@ -216,6 +216,12 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req // Ensure Services err = deployment.EnsureServices(ctx, helper, instance) if err != nil { + instance.Status.Conditions.MarkFalse( + dataplanev1.SetupReadyCondition, + condition.ErrorReason, + condition.SeverityError, + dataplanev1.DataPlaneNodeSetErrorMessage, + err.Error()) return ctrl.Result{}, err } @@ -267,7 +273,7 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req instance.Status.Conditions.MarkFalse( condition.InputReadyCondition, condition.RequestedReason, - condition.SeverityWarning, + condition.SeverityError, err.Error()) } return result, err @@ -299,7 +305,14 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req _, err = deployment.GenerateNodeSetInventory(ctx, helper, instance, allIPSets, dnsAddresses, dataplaneAnsibleImageDefaults) if err != nil { - util.LogErrorForObject(helper, err, fmt.Sprintf("Unable to generate inventory for %s", instance.Name), instance) + errorMsg := fmt.Sprintf("Unable to generate inventory for %s", instance.Name) + util.LogErrorForObject(helper, err, errorMsg, instance) + instance.Status.Conditions.MarkFalse( + dataplanev1.SetupReadyCondition, + condition.ErrorReason, + condition.SeverityError, + dataplanev1.DataPlaneNodeSetErrorMessage, + errorMsg) return ctrl.Result{}, err } diff --git a/pkg/deployment/deployment.go b/pkg/deployment/deployment.go index 00970d624..bbd855dcd 100644 --- a/pkg/deployment/deployment.go +++ b/pkg/deployment/deployment.go @@ -162,7 +162,7 @@ func (d *Deployer) ConditionalDeploy( nsConditions.Set(condition.FalseCondition( readyCondition, condition.ErrorReason, - condition.SeverityWarning, + condition.SeverityError, readyErrorMessage, err.Error())) }