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

EC2 plugin incorrectly reports current instance count

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Environment:
      AWS Hosted CentOS release 6.4 (Final) x86_64
      Jenkins ver. 1.533
      Amazon EC2 plugin 1.18
    • Similar Issues:

      Description

      This issue has come up in the past ~48 hours or so after a dev added a theme plugin and updated plugins.

      Ec2 plugin now states that instance cap has been reached and will not provision any further instances.

      Currently no slave instances exist (all terminated several hours ago).
      Plugin has been disabled and re-enabled.
      Cloud config removed and re-created.
      Cap has been increased to 50 (normally 10)
      All without success.

      Log output as below

      02/10/2013 9:48:03 PM hudson.plugins.ec2.EC2Cloud addProvisionedSlave
      INFO: Total instance cap of 10 reached, not provisioning.
      02/10/2013 9:48:13 PM hudson.plugins.ec2.EC2Cloud addProvisionedSlave
      INFO: Total instance cap of 50 reached, not provisioning.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Roland Groen
          Path:
          src/main/java/hudson/plugins/ec2/EC2Cloud.java
          src/main/java/hudson/plugins/ec2/SlaveTemplate.java
          http://jenkins-ci.org/commit/ec2-plugin/deffa182c4d64fcaf187010814b86df40d61a6a2
          Log:
          JENKINS-19845, EC2 plugin incorrectly reports current instance count

          • Now using the specific 'ec2slave' tag
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Roland Groen Path: src/main/java/hudson/plugins/ec2/EC2Cloud.java src/main/java/hudson/plugins/ec2/SlaveTemplate.java http://jenkins-ci.org/commit/ec2-plugin/deffa182c4d64fcaf187010814b86df40d61a6a2 Log: JENKINS-19845 , EC2 plugin incorrectly reports current instance count Now using the specific 'ec2slave' tag
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Roland Groen
          Path:
          src/main/java/hudson/plugins/ec2/EC2Cloud.java
          src/main/java/hudson/plugins/ec2/EC2Tag.java
          src/main/java/hudson/plugins/ec2/SlaveTemplate.java
          http://jenkins-ci.org/commit/ec2-plugin/5286a643db63d6199f1a99e2015046e0948c7867
          Log:
          JENKINS-19845, EC2 plugin incorrectly reports current instance count

          • Changed tag name to jenkins_slave_type
          • Made the tag name a static value
          • Cleaned up indentation
          • Removed eclipse import format changes
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Roland Groen Path: src/main/java/hudson/plugins/ec2/EC2Cloud.java src/main/java/hudson/plugins/ec2/EC2Tag.java src/main/java/hudson/plugins/ec2/SlaveTemplate.java http://jenkins-ci.org/commit/ec2-plugin/5286a643db63d6199f1a99e2015046e0948c7867 Log: JENKINS-19845 , EC2 plugin incorrectly reports current instance count Changed tag name to jenkins_slave_type Made the tag name a static value Cleaned up indentation Removed eclipse import format changes
          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/EC2Tag.java
          src/main/java/hudson/plugins/ec2/SlaveTemplate.java
          http://jenkins-ci.org/commit/ec2-plugin/2b28c7acb1d45e558c0ad8b306c960ed91d8a43d
          Log:
          Merge pull request #107 from EdiaEducationTechnology/master

          JENKINS-19845

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/b99f8191e990...2b28c7acb1d4

          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/EC2Tag.java src/main/java/hudson/plugins/ec2/SlaveTemplate.java http://jenkins-ci.org/commit/ec2-plugin/2b28c7acb1d45e558c0ad8b306c960ed91d8a43d Log: Merge pull request #107 from EdiaEducationTechnology/master JENKINS-19845 Compare: https://github.com/jenkinsci/ec2-plugin/compare/b99f8191e990...2b28c7acb1d4
          Hide
          martinfr62 martinfr62 added a comment -

          This fix does not resolve the following use cases

          1. Multiple jenkins servers running in the same VPC using the same ami - needed when 1 jenkins cannot manage that many jobs and/or each team wants their own jenkins server

          2. Multple labels using same ami
          2.1 - Different instance sizes for different build jobs/labels (eg use 5 T2Medium and 4 Large of same ami)
          2.2 - Different subnets used for different labels - all sorts of reasons to use multiple subnets (access control just being one of them)
          2.3 - Different instance counts for different labels/builds - so can manage costs differently (eg 2 for nightly builds and 5 for release and 10 for CI) - this allows bunch of CI builds to not block a release build for instance, or for the long running nightly build to not interfere with a CI build.

          Proposed solution - extend current fix of a tag to indicate this is a jenkins instance, to indicate it's a jenkins instance for a specific label - add labels to the EC2Tag.TAG_NAME_JENKINS_SLAVE_TYPE when instance started and match the label requested in isEc2ProvisionedSlave

          Solves both 1 and 2.

          Show
          martinfr62 martinfr62 added a comment - This fix does not resolve the following use cases 1. Multiple jenkins servers running in the same VPC using the same ami - needed when 1 jenkins cannot manage that many jobs and/or each team wants their own jenkins server 2. Multple labels using same ami 2.1 - Different instance sizes for different build jobs/labels (eg use 5 T2Medium and 4 Large of same ami) 2.2 - Different subnets used for different labels - all sorts of reasons to use multiple subnets (access control just being one of them) 2.3 - Different instance counts for different labels/builds - so can manage costs differently (eg 2 for nightly builds and 5 for release and 10 for CI) - this allows bunch of CI builds to not block a release build for instance, or for the long running nightly build to not interfere with a CI build. Proposed solution - extend current fix of a tag to indicate this is a jenkins instance, to indicate it's a jenkins instance for a specific label - add labels to the EC2Tag.TAG_NAME_JENKINS_SLAVE_TYPE when instance started and match the label requested in isEc2ProvisionedSlave Solves both 1 and 2.
          Hide
          francisu Francis Upton added a comment -

          The tag has been extended with the description of the slave template. This should resolve the problems. This was done prior to 1.30.

          Show
          francisu Francis Upton added a comment - The tag has been extended with the description of the slave template. This should resolve the problems. This was done prior to 1.30.

            People

            • Assignee:
              francisu Francis Upton
              Reporter:
              simonbeckett Simon Beckett
            • Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: