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

instance caps incorrectly calculated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
      None
    • Environment:
      ec2-plugin 1.26
      jenkins 1.605
    • Similar Issues:

      Description

      Instance counts towards the cap feature are incorrectly counted when you use the same AMI for multiple jenkins slave types it with differing ec2 instance types. The count is a sum of all the instances provisioned by the plugin rather than the number provisioned per discrete slave configuration.

      https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/EC2Cloud.java#L241

      If the ami id and the tag jenkins_slave_type match, it is counted toward the cap.

      Scenario:

      slave description: small slave
      ami: ami-12345
      instance type: t1.small
      cap: 5

      slave description: big slave
      ami: ami-12345
      instance type: c3.xlarge
      cap: 2

      If there are five "small slaves" running it won't provision any "big slaves", reports the following:

      AMI Instance cap of 2 reached for ami ami-12345, not provisioning.

        Attachments

          Activity

          Hide
          snallami suresh nallamilli added a comment -
          Show
          snallami suresh nallamilli added a comment - Submitted https://github.com/jenkinsci/ec2-plugin/pull/159 for this issue
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Francis Upton
          Path:
          src/main/java/hudson/plugins/ec2/EC2Cloud.java
          src/main/java/hudson/plugins/ec2/SlaveTemplate.java
          http://jenkins-ci.org/commit/ec2-plugin/b27bea5d6494fd11163115d3e602a03d04d02bd8
          Log:
          Merge pull request #159 from snallami/master

          JENKINS-27601 fix for instance caps which are calculated solely based on AMI ID

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/85e9152347e7...b27bea5d6494

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton Path: src/main/java/hudson/plugins/ec2/EC2Cloud.java src/main/java/hudson/plugins/ec2/SlaveTemplate.java http://jenkins-ci.org/commit/ec2-plugin/b27bea5d6494fd11163115d3e602a03d04d02bd8 Log: Merge pull request #159 from snallami/master JENKINS-27601 fix for instance caps which are calculated solely based on AMI ID Compare: https://github.com/jenkinsci/ec2-plugin/compare/85e9152347e7...b27bea5d6494
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Francis Upton IV
          Path:
          src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly
          src/main/resources/hudson/plugins/ec2/SlaveTemplate/help-description.html
          http://jenkins-ci.org/commit/ec2-plugin/ad614dbbe2866a9b5ba9674d88b07184cbafd2a3
          Log:
          JENKINS-27601 instance caps incorrectly calculated (fix description)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton IV Path: src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly src/main/resources/hudson/plugins/ec2/SlaveTemplate/help-description.html http://jenkins-ci.org/commit/ec2-plugin/ad614dbbe2866a9b5ba9674d88b07184cbafd2a3 Log: JENKINS-27601 instance caps incorrectly calculated (fix description)
          Hide
          trbaker Trevor Baker added a comment -

          It would be great to have a new release cut so we can start using this! Thanks!

          Show
          trbaker Trevor Baker added a comment - It would be great to have a new release cut so we can start using this! Thanks!
          Hide
          francisu Francis Upton added a comment -

          Can you try out the snapshot and see if it works for you (there were other problems with it that prevented me from doing a release)?

          Show
          francisu Francis Upton added a comment - Can you try out the snapshot and see if it works for you (there were other problems with it that prevented me from doing a release)?
          Hide
          francisu Francis Upton added a comment -

          s/b resolved in 1.30 (instance cap count rewritten)

          Show
          francisu Francis Upton added a comment - s/b resolved in 1.30 (instance cap count rewritten)

            People

            • Assignee:
              francisu Francis Upton
              Reporter:
              trbaker Trevor Baker
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: