Skip to content

Commit

Permalink
JENKINS-19845, EC2 plugin incorrectly reports current instance count
Browse files Browse the repository at this point in the history
- Now using the specific 'ec2slave' tag
  • Loading branch information
rolandgroen committed Sep 11, 2014
1 parent e81094c commit ace707c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/hudson/plugins/ec2/EC2Cloud.java
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit ace707c

Please sign in to comment.