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

instance caps incorrectly calculated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • ec2-plugin
    • None
    • ec2-plugin 1.26
      jenkins 1.605

    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

          snallami suresh nallamilli added a comment - Submitted https://github.com/jenkinsci/ec2-plugin/pull/159 for this issue

          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

          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

          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)

          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)
          trbaker Trevor Baker added a comment -

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

          trbaker Trevor Baker added a comment - It would be great to have a new release cut so we can start using this! Thanks!
          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)?

          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)?
          francisu Francis Upton added a comment -

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

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

          People

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

            Dates

              Created:
              Updated:
              Resolved: