@@ -164,6 +164,7 @@ func (r *ROSAMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Requ
164164 if ! controlPlane .Status .Ready && controlPlane .ObjectMeta .DeletionTimestamp .IsZero () {
165165 log .Info ("Control plane is not ready yet" )
166166 err := machinePoolScope .RosaMchinePoolReadyFalse (expinfrav1 .WaitingForRosaControlPlaneReason , "" )
167+
167168 return ctrl.Result {}, err
168169 }
169170
@@ -201,11 +202,12 @@ func (r *ROSAMachinePoolReconciler) reconcileNormal(ctx context.Context,
201202 }
202203
203204 failureMessage , err := validateMachinePoolSpec (machinePoolScope )
205+
204206 if err != nil {
205207 return ctrl.Result {}, fmt .Errorf ("failed to validate ROSAMachinePool.spec: %w" , err )
206208 }
209+
207210 if failureMessage != nil {
208- machinePoolScope .RosaMachinePool .Status .FailureMessage = failureMessage
209211 // dont' requeue because input is invalid and manual intervention is needed.
210212 return ctrl.Result {}, nil
211213 }
@@ -225,6 +227,7 @@ func (r *ROSAMachinePoolReconciler) reconcileNormal(ctx context.Context,
225227 }
226228
227229 nodePool , found , err := ocmClient .GetNodePool (machinePoolScope .ControlPlane .Status .ID , rosaMachinePool .Spec .NodePoolName )
230+
228231 if err != nil {
229232 return ctrl.Result {}, err
230233 }
@@ -297,6 +300,7 @@ func (r *ROSAMachinePoolReconciler) reconcileNormal(ctx context.Context,
297300 }
298301
299302 machinePoolScope .RosaMachinePool .Status .ID = nodePool .ID ()
303+
300304 return ctrl.Result {}, nil
301305}
302306
0 commit comments