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

EC2 plugin 1.37 fails to provision previously defined slaves

    Details

    • Similar Issues:

      Description

      With the EC2 plugin version 1.37, existing stopped instances are not started again during provisioning with the following message in the Jenkins log when the instance cap is reached:

      Cannot provision - no capacity for instances: -1

      reverting to version 1.36 fixes the issue.

        Attachments

          Issue Links

            Activity

            Hide
            krachynski Ken Rachynski added a comment -

            Further comment. I have a failing agent right now because the 'root command prefix' which I attempted to set as 'sudo' is not being saved in the configuration. It rather looks like I need to uninstall the entire thing and start over now.

            Show
            krachynski Ken Rachynski added a comment - Further comment. I have a failing agent right now because the 'root command prefix' which I attempted to set as 'sudo' is not being saved in the configuration. It rather looks like I need to uninstall the entire thing and start over now.
            Hide
            homebrew Ryan Smith added a comment -

            I upgraded from 1.36 to 1.38, and nodes stopped automatically launching.  I was able to manually trigger node launches by going to Nodes and using the "Provision via" drop down.

             

            Reading the note above from Ken Rachynski on 2017-11-24 12:38, I changed the EC2 ami configs from m3.large to m3.xlarge, saved, and then changed them back to m3.large, saved.  And immediately following that instances started auto launching and taking work.

            Show
            homebrew Ryan Smith added a comment - I upgraded from 1.36 to 1.38, and nodes stopped automatically launching.  I was able to manually trigger node launches by going to Nodes and using the "Provision via" drop down.   Reading the note above from Ken Rachynski on 2017-11-24 12:38, I changed the EC2 ami configs from m3.large to m3.xlarge, saved, and then changed them back to m3.large, saved.  And immediately following that instances started auto launching and taking work.
            Hide
            francisu Francis Upton added a comment -

            I see the problem here. This was caused by the "node" field that was added to the SlaveTemplate https://github.com/jenkinsci/ec2-plugin/pull/232. The initial value of "node" was set to "true", allowing it to be provisioned normally. However, any serialized SlaveTemplates would (incorrectly) have the value of "false" which caused them to be ignored during the normal provisioning. The work of the PR did not consider this case.

            Show
            francisu Francis Upton added a comment - I see the problem here. This was caused by the "node" field that was added to the SlaveTemplate https://github.com/jenkinsci/ec2-plugin/pull/232 . The initial value of "node" was set to "true", allowing it to be provisioned normally. However, any serialized SlaveTemplates would (incorrectly) have the value of "false" which caused them to be ignored during the normal provisioning. The work of the PR did not consider this case.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Francis Upton IV
            Path:
            src/main/java/hudson/plugins/ec2/EC2Cloud.java
            src/main/java/hudson/plugins/ec2/EC2Step.java
            src/main/java/hudson/plugins/ec2/SlaveTemplate.java
            src/test/java/hudson/plugins/ec2/EC2StepTest.java
            http://jenkins-ci.org/commit/ec2-plugin/a80c336bfc12ee28828981bdceae88842daabb07
            Log:
            JENKINS-50105 EC2 Step provisioning incorrectly specifies a label
            JENKINS-47130 EC2 plugin 1.37 fails to provision previously defined slaves

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton IV Path: src/main/java/hudson/plugins/ec2/EC2Cloud.java src/main/java/hudson/plugins/ec2/EC2Step.java src/main/java/hudson/plugins/ec2/SlaveTemplate.java src/test/java/hudson/plugins/ec2/EC2StepTest.java http://jenkins-ci.org/commit/ec2-plugin/a80c336bfc12ee28828981bdceae88842daabb07 Log: JENKINS-50105 EC2 Step provisioning incorrectly specifies a label JENKINS-47130 EC2 plugin 1.37 fails to provision previously defined slaves
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Francis Upton IV
            Path:
            src/main/java/hudson/plugins/ec2/EC2Cloud.java
            src/main/java/hudson/plugins/ec2/EC2Step.java
            src/main/java/hudson/plugins/ec2/SlaveTemplate.java
            src/test/java/hudson/plugins/ec2/EC2StepTest.java
            http://jenkins-ci.org/commit/ec2-plugin/affb7f407cd024accdf4e9093b07efada117814d
            Log:
            JENKINS-50105 EC2 Step provisioning incorrectly specifies a label (#268)

            JENKINS-47130 EC2 plugin 1.37 fails to provision previously defined slaves

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton IV Path: src/main/java/hudson/plugins/ec2/EC2Cloud.java src/main/java/hudson/plugins/ec2/EC2Step.java src/main/java/hudson/plugins/ec2/SlaveTemplate.java src/test/java/hudson/plugins/ec2/EC2StepTest.java http://jenkins-ci.org/commit/ec2-plugin/affb7f407cd024accdf4e9093b07efada117814d Log: JENKINS-50105 EC2 Step provisioning incorrectly specifies a label (#268) JENKINS-47130 EC2 plugin 1.37 fails to provision previously defined slaves

              People

              • Assignee:
                francisu Francis Upton
                Reporter:
                vineus Vincent de Lagabbe
              • Votes:
                3 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: