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

Sometimes starts the wrong instance

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • ec2-plugin
    • None

    Description

      Relevant configuration - I have one cloud setup, with 4 different AMIs defined. They are each technically identical, the only difference being that they have different Jenkins labels so that certain builds only happen on a certain machine. Let's call them A, B, C, and D.

      Expected behavior - If all build hosts are stopped and I start a build for project B, only the build host for project B will start.

      Actual behavior - If all the build hosts are stopped, and I start a build for project B, the A build host is started first, and once that is up, the B build host is started, and once that is up the B project starts building on it as expected. This introduces a longer than expected delay when starting builds.

      Attachments

        Issue Links

          Activity

            I've now also tried starting a build for project D, and that also starts build host for A first, then the appropriate host. In the plugin config the AMIs are listed in order A-D, so it does not look like a list traversal bug where it is starting at A and going down the list until the right one is found. It seems it just always wants to start the first one, no matter what.

            qhartman Quentin Hartman added a comment - I've now also tried starting a build for project D, and that also starts build host for A first, then the appropriate host. In the plugin config the AMIs are listed in order A-D, so it does not look like a list traversal bug where it is starting at A and going down the list until the right one is found. It seems it just always wants to start the first one, no matter what.
            zzzeek mike bayer added a comment -

            this is likely a duplicate of JENKINS-12332

            zzzeek mike bayer added a comment - this is likely a duplicate of JENKINS-12332

            Code changed in jenkins
            User: Kevin P. Fleming
            Path:
            src/main/java/hudson/plugins/ec2/EC2Cloud.java
            src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly
            src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly
            src/test/java/hudson/plugins/ec2/SlaveTemplateTest.java
            http://jenkins-ci.org/commit/ec2-plugin/803dfea25551d92453e99fd39e7e366d41007592
            Log:
            Change primary template identification to be its name, not its AMI.

            Many useful configurations will have multiple slave templates that use
            the same AMI (but differ in other aspects). This patch changes various
            parts of the code to properly identify templates by their names (in the
            'description' field) instead of their AMI. As an example, the manual slave
            provisioning button, before this patch, would allow the user to select a
            template from a drop-down list, but then launched the slave using the
            template's AMI, which could have resulted in the wrong template being
            used for the launch. This patch also changes the global config page so
            that the 'description' field is the first field in each template
            definition, to emphasize its importance.

            Addresses JENKINS-7960 and JENKINS-15158.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kevin P. Fleming Path: src/main/java/hudson/plugins/ec2/EC2Cloud.java src/main/resources/hudson/plugins/ec2/EC2Cloud/computerSet.jelly src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly src/test/java/hudson/plugins/ec2/SlaveTemplateTest.java http://jenkins-ci.org/commit/ec2-plugin/803dfea25551d92453e99fd39e7e366d41007592 Log: Change primary template identification to be its name, not its AMI. Many useful configurations will have multiple slave templates that use the same AMI (but differ in other aspects). This patch changes various parts of the code to properly identify templates by their names (in the 'description' field) instead of their AMI. As an example, the manual slave provisioning button, before this patch, would allow the user to select a template from a drop-down list, but then launched the slave using the template's AMI, which could have resulted in the wrong template being used for the launch. This patch also changes the global config page so that the 'description' field is the first field in each template definition, to emphasize its importance. Addresses JENKINS-7960 and JENKINS-15158 .
            francisu Francis Upton added a comment -

            Fixed by patch from Kevin Fleming

            francisu Francis Upton added a comment - Fixed by patch from Kevin Fleming

            People

              francisu Francis Upton
              qhartman Quentin Hartman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: