Skip to content

Commit 31233b3

Browse files
committed
Allow updating nodeset inventory with failed deployment status
This way new deployments can use updated inventory and as we ignore earlier failed deployments with overall deployment status, users don't have to delete the failed deployments. Jira: https://issues.redhat.com/browse/OSPRH-20821 Signed-off-by: rabi <[email protected]>
1 parent 0528971 commit 31233b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

controllers/dataplane/openstackdataplanenodeset_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,20 +403,20 @@ func (r *OpenStackDataPlaneNodeSetReconciler) Reconcile(ctx context.Context, req
403403
return ctrl.Result{}, err
404404
}
405405

406-
if !isDeploymentRunning && !isDeploymentFailed {
406+
if !isDeploymentRunning {
407407
// Generate NodeSet Inventory
408-
_, err = deployment.GenerateNodeSetInventory(ctx, helper, instance,
408+
_, errInventory := deployment.GenerateNodeSetInventory(ctx, helper, instance,
409409
allIPSets, dnsDetails.ServerAddresses, containerImages, netServiceNetMap)
410-
if err != nil {
410+
if errInventory != nil {
411411
errorMsg := fmt.Sprintf("Unable to generate inventory for %s", instance.Name)
412-
util.LogErrorForObject(helper, err, errorMsg, instance)
412+
util.LogErrorForObject(helper, errInventory, errorMsg, instance)
413413
instance.Status.Conditions.MarkFalse(
414414
dataplanev1.SetupReadyCondition,
415415
condition.ErrorReason,
416416
condition.SeverityError,
417417
dataplanev1.DataPlaneNodeSetErrorMessage,
418418
errorMsg)
419-
return ctrl.Result{}, err
419+
return ctrl.Result{}, errInventory
420420
}
421421
}
422422
// all setup tasks complete, mark SetupReadyCondition True

0 commit comments

Comments
 (0)