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

EC2 plugin will launch more instances than cap allows if enough jobs are queued up while no instances are active

    XMLWordPrintable

    Details

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

      Description

      I have an instance cap of 3 set. If I have no instances currently running and I queue up 8 jobs that are tied to one AMI, more than three instances will be started. I believe this is because the instance cap is checked against the number of instances currently running from EC2 and then launches the instance. I'd think that, rather than just checking against the EC2 running instance count, we should be also including the number of instances we've started launching. That said, I'm not entirely sure how we'd go about doing that.

        Attachments

          Activity

          Hide
          kpfleming Kevin Fleming added a comment -

          This has already been addressed in the master branch of the plugin, and will be included in the next release. Thanks!

          Show
          kpfleming Kevin Fleming added a comment - This has already been addressed in the master branch of the plugin, and will be included in the next release. Thanks!
          Hide
          sit Emil Sit added a comment -

          Cool; which commit fixes this? Thanks!

          Show
          sit Emil Sit added a comment - Cool; which commit fixes this? Thanks!
          Hide
          kpfleming Kevin Fleming added a comment -

          Ahh... oops. I'm wrong

          This is fixed in a branch of mine that is queued for the 1.19 release of the plugin; there is a build currently being tested to be the 1.18 release. Once that is pushed out Francis plans to merge my template-instance-cap-fix branch, which corrects this issue among others, but requires Jenkins 1.503 or later. If you'd like to help test my branch, it's at github.com/kpfleming/jenkins-ec2-plugin, called template-instance-cap-fix.

          Show
          kpfleming Kevin Fleming added a comment - Ahh... oops. I'm wrong This is fixed in a branch of mine that is queued for the 1.19 release of the plugin; there is a build currently being tested to be the 1.18 release. Once that is pushed out Francis plans to merge my template-instance-cap-fix branch, which corrects this issue among others, but requires Jenkins 1.503 or later. If you'd like to help test my branch, it's at github.com/kpfleming/jenkins-ec2-plugin, called template-instance-cap-fix.
          Hide
          jntkflow Daniel Hyon added a comment -

          Can some generous soul point me to the changes/diffs that were introduced to remedy this bug?

          Thank you!

          Show
          jntkflow Daniel Hyon added a comment - Can some generous soul point me to the changes/diffs that were introduced to remedy this bug? Thank you!
          Hide
          francisu Francis Upton added a comment -

          This appears to be fixed thanks to Mike Bayer <mike_mp@zzzcomputing.com> on 10/9/12 6:42 PM

          Show
          francisu Francis Upton added a comment - This appears to be fixed thanks to Mike Bayer <mike_mp@zzzcomputing.com> on 10/9/12 6:42 PM

            People

            • Assignee:
              francisu Francis Upton
              Reporter:
              abayer Andrew Bayer
            • Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: