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

Spot instances not filtered by template description

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
    • Environment:
      Jenkins 2.121.1, ec2-plugin 1.39, jenkins running in a docker container on Ubuntu 16.04
    • Similar Issues:
    • Released As:
      1.40

      Description

      We have several jenkins instances running with the EC2 plugin configured to only restrict instance counts based on the template. The template description is honored when counting the number of existing instances, but for spot instances the template description is not checked at all against the jenkins_slave_type tag.

       

      Steps expected for EC2Cloud.countCurrentEC2Slaves(template) when template is not null:

      1. loop through all instances
        1. if instance jenkins_slave_type tag value matches the template description, increment the counter by 1
      2. loop through spot instance requests with tag: jenkins_slave_type
        1. if spot instance request is active/open and tag value matches the template description, increment the counter by 1

      What actually happens:

      • loop through all instances
        1. if instance jenkins_slave_type tag contents matches the template description, increment the counter by 1
      • loop through spot instance requests with tag: jenkins_slave_type
        1. if spot instance request is in active/open state, increment the counter by 1, template description is not compared to the tag value

       

        Attachments

          Activity

          Hide
          perrin Perrin Morrow added a comment -

          We struck this a couple of months ago and have been running a custom build of the plugin to fix the problem. Our build was branched from an earlier tag but the change applied cleanly to master. I've raised a pull request with my fix.

          Show
          perrin Perrin Morrow added a comment - We struck this a couple of months ago and have been running a custom build of the plugin to fix the problem. Our build was branched from an earlier tag but the change applied cleanly to master. I've raised a pull request  with my fix.

            People

            • Assignee:
              julienduchesne Julien Duchesne
              Reporter:
              nlloyd Nick Lloyd
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: