Describe the bug
plugin is enabling the scale-in(newInstancesProtectedFromScaleIn) protection on ASG with spot instances. due to that asg could not able to make instance could not terminate instances.
Activity on asg:
Could not scale to desired capacity because all remaining instances are protected from scale-in.
To Reproduce
ec2-fleet ASG with spot instances
etc.
Issue Details
Describe the bug plugin is enabling the scale-in(newInstancesProtectedFromScaleIn) protection on ASG with spot instances. due to that asg could not able to make instance could not terminate instances.
Activity on asg: Could not scale to desired capacity because all remaining instances are protected from scale-in.
To Reproduce ec2-fleet ASG with spot instances etc.
Cloud Trail Logs "userAgent": "ec2-fleet-plugin, aws-sdk-java/1.12.633 Linux/4.14.281-212.502.amzn2.x86_64 OpenJDK_64-Bit_Server_VM/17.0.12+7-LTS java/17.0.12 groovy/2.4.21 vendor/Amazon.com_Inc. cfg/retry-mode/legacy", "requestParameters": { "autoScalingGroupName": "jenkins-slave", "minSize": 0, "maxSize": 1, "desiredCapacity": 0, "newInstancesProtectedFromScaleIn": true },
Environment Details
Plugin Version? 3.20
Jenkins Version? 2.246
Spot Fleet or ASG? ASG(spot instances)
Label based fleet? NO
Linux or Windows? Linux