-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
ec2-plugin 1.34; aws-java-sdk 1.10.50
-
-
1.44.1
Steps to reproduce:
- set the global Instance Cap to 5 (or some other number)
- check the box for "Stop/Disconnect on Idle Timeout" so the instances stop instead of terminate
- set the "Idle termination time" to a low number so you don't have to wait too long after the jobs complete
- run a few jobs so you have some EC2 agents available to be stopped
- give some time for the EC2 agents to idle and stop
- change the global Instance Cap to equal the number of stopped EC2 agents
- Queue up some jobs to run again. The EC2 agents will not wake up and the following entry is in the log:
hudson.plugins.ec2.EC2Cloud#provisionSlaveIfPossible: Cannot provision - no capacity for instances: -1
Variation on the issue:
- If you change the global Instance Cap to <number of stopped EC2 agents> + 1 and you start running your jobs, the stopped EC2 agents will wake up and the jobs will run on them, but another new EC2 agent will not be created/started.