Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12767

EC2 plugin's EC2Cloud#provision does not take into account number of executors per node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 1.424.2 and EC2 plugin 1.13.

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

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

      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.

            kohsuke Kohsuke Kawaguchi
            sit Emil Sit
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: