Skip to content
Permalink
Browse files
JENKINS-19845, EC2 plugin incorrectly reports current instance count
- Now using the specific 'ec2slave' tag
  • Loading branch information
rolandgroen committed Sep 11, 2014
1 parent e81094c commit ace707c4a3498384d8d6c382a84200152f17cb1e
Showing 1 changed file with 2 additions and 3 deletions.
@@ -296,9 +296,8 @@ public void doProvision(StaplerRequest req, StaplerResponse rsp, @QueryParameter
* Check for the count of EC2 slaves and determine if a new slave can be added.
* Takes into account both what Amazon reports as well as an internal count
* of slaves currently being "provisioned".
* @param tags
*/
private boolean addProvisionedSlave(String ami, List<EC2Tag> tags, int amiCap) throws AmazonClientException {
private boolean addProvisionedSlave(String ami, int amiCap) throws AmazonClientException {
int estimatedTotalSlaves = countCurrentEC2Slaves(null);
int estimatedAmiSlaves = countCurrentEC2Slaves(ami);

@@ -389,7 +388,7 @@ public Collection<PlannedNode> provision(Label label, int excessWorkload) {

while (excessWorkload>0) {

if (!addProvisionedSlave(t.ami, t.getTags(), amiCap)) {
if (!addProvisionedSlave(t.ami, amiCap)) {
break;
}

0 comments on commit ace707c

Please sign in to comment.