@@ -272,6 +272,11 @@ func (r *ROSAMachinePoolReconciler) reconcileNormal(ctx context.Context,
272272
273273 nodePool , err = ocmClient .CreateNodePool (machinePoolScope .ControlPlane .Status .ID , nodePoolSpec )
274274 if err != nil {
275+ conditions .MarkFalse (rosaMachinePool ,
276+ expinfrav1 .RosaMachinePoolReadyCondition ,
277+ expinfrav1 .RosaMachinePoolReconciliationFailedReason ,
278+ clusterv1 .ConditionSeverityError ,
279+ "failed to create ROSAMachinePool: %s" , err .Error ())
275280 return ctrl.Result {}, fmt .Errorf ("failed to create nodepool: %w" , err )
276281 }
277282
@@ -308,11 +313,7 @@ func (r *ROSAMachinePoolReconciler) reconcileDelete(
308313
309314func (r * ROSAMachinePoolReconciler ) reconcileMachinePoolVersion (machinePoolScope * scope.RosaMachinePoolScope , ocmClient * ocm.Client , nodePool * cmv1.NodePool ) error {
310315 version := machinePoolScope .RosaMachinePool .Spec .Version
311- if version == "" {
312- version = machinePoolScope .ControlPlane .Spec .Version
313- }
314-
315- if version == rosa .RawVersionID (nodePool .Version ()) {
316+ if version == "" || version == rosa .RawVersionID (nodePool .Version ()) {
316317 conditions .MarkFalse (machinePoolScope .RosaMachinePool , expinfrav1 .RosaMachinePoolUpgradingCondition , "upgraded" , clusterv1 .ConditionSeverityInfo , "" )
317318 return nil
318319 }
@@ -370,6 +371,11 @@ func (r *ROSAMachinePoolReconciler) updateNodePool(machinePoolScope *scope.RosaM
370371
371372 updatedNodePool , err := ocmClient .UpdateNodePool (machinePoolScope .ControlPlane .Status .ID , nodePoolSpec )
372373 if err != nil {
374+ conditions .MarkFalse (machinePoolScope .RosaMachinePool ,
375+ expinfrav1 .RosaMachinePoolReadyCondition ,
376+ expinfrav1 .RosaMachinePoolReconciliationFailedReason ,
377+ clusterv1 .ConditionSeverityError ,
378+ "failed to update ROSAMachinePool: %s" , err .Error ())
373379 return nil , fmt .Errorf ("failed to update nodePool: %w" , err )
374380 }
375381
0 commit comments