@@ -267,7 +267,7 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP
267
267
268
268
if asg == nil {
269
269
// Create new ASG
270
- if _ , err := r .createPool (machinePoolScope , clusterScope ); err != nil {
270
+ if err := r .createPool (machinePoolScope , clusterScope ); err != nil {
271
271
conditions .MarkFalse (machinePoolScope .AWSMachinePool , expinfrav1 .ASGReadyCondition , expinfrav1 .ASGProvisionFailedReason , clusterv1 .ConditionSeverityError , err .Error ())
272
272
return ctrl.Result {}, err
273
273
}
@@ -454,21 +454,17 @@ func (r *AWSMachinePoolReconciler) updatePool(machinePoolScope *scope.MachinePoo
454
454
return nil
455
455
}
456
456
457
- func (r * AWSMachinePoolReconciler ) createPool (machinePoolScope * scope.MachinePoolScope , clusterScope cloud.ClusterScoper ) ( * expinfrav1. AutoScalingGroup , error ) {
457
+ func (r * AWSMachinePoolReconciler ) createPool (machinePoolScope * scope.MachinePoolScope , clusterScope cloud.ClusterScoper ) error {
458
458
clusterScope .Info ("Initializing ASG client" )
459
459
460
460
asgsvc := r .getASGService (clusterScope )
461
461
462
462
machinePoolScope .Info ("Creating Autoscaling Group" )
463
- asg , err := asgsvc .CreateASG (machinePoolScope )
464
- if err != nil {
465
- return nil , errors .Wrapf (err , "failed to create AWSMachinePool" )
466
- }
467
- suspendedProcessesSlice := machinePoolScope .AWSMachinePool .Spec .SuspendProcesses .ConvertSetValuesToStringSlice ()
468
- if err := asgsvc .SuspendProcesses (asg .Name , suspendedProcessesSlice ); err != nil {
469
- return nil , errors .Wrapf (err , "failed to suspend processes while trying to create Pool" )
463
+ if _ , err := asgsvc .CreateASG (machinePoolScope ); err != nil {
464
+ return errors .Wrapf (err , "failed to create AWSMachinePool" )
470
465
}
471
- return asg , nil
466
+
467
+ return nil
472
468
}
473
469
474
470
func (r * AWSMachinePoolReconciler ) findASG (machinePoolScope * scope.MachinePoolScope , asgsvc services.ASGInterface ) (* expinfrav1.AutoScalingGroup , error ) {
0 commit comments