Emil Sit created JENKINS-12767:
----------------------------------

             Summary: EC2 plugin's EC2Cloud#provision does not take into 
account number of executors per node
                 Key: JENKINS-12767
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12767
             Project: Jenkins
          Issue Type: Bug
          Components: ec2, plugin
         Environment: Jenkins 1.424.2 and EC2 plugin 1.13.
            Reporter: Emil Sit
            Assignee: Kohsuke Kawaguchi


The code in EC2Cloud#provision(Label label, int excessWorkload) launches one 
additional slave per excess workload.

{code:java}
            List<PlannedNode> r = new ArrayList<PlannedNode>();
            for( ; excessWorkload>0; excessWorkload-- ) {
               // ... provision nodes.
            }
{code}

However, according to the JavaDoc for provision, the excessWorkload request 
indicates the number of executors needed, not the number of slaves needed.  
(See http://javadoc.jenkins-ci.org/?hudson/slaves/Cloud.html).

Based on the type of node provisioned, excessWorkload should be decremented 
based on the number of executors the node will provide.

There could eventually be some algorithm to choose whether to allocate a single 
larger slave or several smaller slaves. Perhaps this should be configurable, 
but even some sort of greedy algorithm would be better than today which results 
in multiple slaves spun up and left idle.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to