From dffba32e197eb8cd44bdbfa823d80bc8fae87cad Mon Sep 17 00:00:00 2001 From: rabi Date: Fri, 7 Jun 2024 09:25:33 +0530 Subject: [PATCH] Mirror nsConditions always to NodeSetDeploymentReadyCondition Let's mirror the nscondtions conditions to NodeSetDeploymentReadyCondition irrespective of error or not. Otherwise we see `Deployment Not Started` message for the nodeset when deployment is actually running. Signed-off-by: rabi --- controllers/openstackdataplanedeployment_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/openstackdataplanedeployment_controller.go b/controllers/openstackdataplanedeployment_controller.go index 9a4b412f3..50ae20bac 100644 --- a/controllers/openstackdataplanedeployment_controller.go +++ b/controllers/openstackdataplanedeployment_controller.go @@ -335,6 +335,7 @@ func (r *OpenStackDataPlaneDeploymentReconciler) Reconcile(ctx context.Context, } nsConditions := instance.Status.NodeSetConditions[nodeSet.Name] + nsConditions.Set(nsConditions.Mirror(dataplanev1.NodeSetDeploymentReadyCondition)) if err != nil { util.LogErrorForObject(helper, err, fmt.Sprintf("OpenStackDeployment error for NodeSet %s", nodeSet.Name), instance) @@ -346,7 +347,6 @@ func (r *OpenStackDataPlaneDeploymentReconciler) Reconcile(ctx context.Context, } else { deploymentErrMsg = fmt.Sprintf("%s & %s", deploymentErrMsg, errMsg) } - nsConditions.Set(nsConditions.Mirror(dataplanev1.NodeSetDeploymentReadyCondition)) errorReason := nsConditions.Get(dataplanev1.NodeSetDeploymentReadyCondition).Reason backoffLimitReached = errorReason == condition.JobReasonBackoffLimitExceeded }