@@ -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