Agree with @akostadinov. Our VPC is used by developers so we have a completely variable number of instances. Currently about 120 and we only really want a handful of Jenkins instances. But if someone decides they need a new dev cluster, we'll have 130 in a few minutes. Or if they decide they don't need a cluster we'll be down to 110. So how can I set my cap?
If someone tries to start a load of builds during the day, they could exhaust the free IP addresses / hit EC2's limit on instances without realising if we disable the cap completely.
If a new ticket was raised, please let me know the ID so I can +1 it! If I don't hear anything I'll try to remember to raise one soon.
Code changed in jenkins
User: Francis Upton IV
Path:
src/main/java/hudson/plugins/ec2/EC2Cloud.java
http://jenkins-ci.org/commit/ec2-plugin/fb48500653bf851b59022b61ed3eb86ac60ab07f
Log:
[FIXED JENKINS-7883] Stopped (as opposed to terminated) slaves are counted against the active instance count for the purpose of launching; can prevent launching of instances