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

EC2 slaves fail to from older configs prior to having the jvmopts

    XMLWordPrintable

Details

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

    Description

      After upgrading the plugin from 1.8 -> 1.9, I could no longer launch EC2 slaves. A log excerpt would show something like the following:

      ...
      Verifying that java exists
      java full version "1.6.0_15-b03"
      Copying slave.jar
      Launching slave agent
      ...
      Then an IOException about the channel being closed unexpectedly (sorry, didn't capture the trace). Eventually the launch would time out and it would try again and again with no success.

      After looking at the svn log I noticed the following change (r33881), which seemed to be where it was dying:

      • sess.execCommand("java -jar /tmp/slave.jar");
        + sess.execCommand("java " + computer.getNode().jvmopts + " -jar /tmp/slave.jar");

      It occurred to me that maybe the jvmopts value didn't exist in the 1.8-style EC2 config, so I saved the AMI with "-verbose" in the JVM options field, saved the config, and launched an EC2 slave successfully. I killed that slave, blanked out the JVM options field, saved again, and again successfully launched an EC2 slave.

      Maybe the plugin needs to guard against a null value from older configs or else massage old configs to fit into the new "schema" or something?

      Attachments

        Activity

          mjmac mjmac created issue -
          mrdavidlaing mrdavidlaing added a comment -

          I had a similar issue trying to start a Windows slave (using the ec2-sshd project).

          For me, I was missing a c:\tmp folder, so the /tmp/slave.jar wasn't being created properly.

          The IOException is a bit of a red herring in my case.

          For what its worth, I found the ec2-sshd method very slow compared to launching the agent via JNLP.

          mrdavidlaing mrdavidlaing added a comment - I had a similar issue trying to start a Windows slave (using the ec2-sshd project). For me, I was missing a c:\tmp folder, so the /tmp/slave.jar wasn't being created properly. The IOException is a bit of a red herring in my case. For what its worth, I found the ec2-sshd method very slow compared to launching the agent via JNLP.
          evernat evernat added a comment -

          The plugin is now at v1.13 and this issue seems to be about the upgrade to 1.9.
          So perhaps this issue could be closed?

          evernat evernat added a comment - The plugin is now at v1.13 and this issue seems to be about the upgrade to 1.9. So perhaps this issue could be closed?
          francisu Francis Upton added a comment -

          I think the requester is right about the issue being the value from the older configs.

          francisu Francis Upton added a comment - I think the requester is right about the issue being the value from the older configs.
          francisu Francis Upton made changes -
          Field Original Value New Value
          Summary EC2 slaves fail to launch after upgrade from 1.8 -> 1.9 EC2 slaves fail to from older configs prior to having the jvmopts
          francisu Francis Upton made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          francisu Francis Upton made changes -
          Assignee Kohsuke Kawaguchi [ kohsuke ] francis Upton [ francisu ]

          Code changed in jenkins
          User: Francis Upton IV
          Path:
          src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
          http://jenkins-ci.org/commit/ec2-plugin/98309095065189ad51033e80f5dea694ce2d9331
          Log:
          [FIXED JENKINS-7219] EC2 slaves fail to launch when using old (< 1.9) configs

          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/ssh/EC2UnixLauncher.java http://jenkins-ci.org/commit/ec2-plugin/98309095065189ad51033e80f5dea694ce2d9331 Log: [FIXED JENKINS-7219] EC2 slaves fail to launch when using old (< 1.9) configs
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          francisu Francis Upton added a comment -

          Fixed in 1.14, not actually tested with an older configuration, but should handle the null value of jvmopts gracefully.

          francisu Francis Upton added a comment - Fixed in 1.14, not actually tested with an older configuration, but should handle the null value of jvmopts gracefully.
          dogfood dogfood added a comment -

          Integrated in plugins_ec2 #54
          [FIXED JENKINS-7219] EC2 slaves fail to launch when using old (< 1.9) configs (Revision 98309095065189ad51033e80f5dea694ce2d9331)

          Result = SUCCESS
          francisu :
          Files :

          • src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
          dogfood dogfood added a comment - Integrated in plugins_ec2 #54 [FIXED JENKINS-7219] EC2 slaves fail to launch when using old (< 1.9) configs (Revision 98309095065189ad51033e80f5dea694ce2d9331) Result = SUCCESS francisu : Files : src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 137318 ] JNJira + In-Review [ 187449 ]

          People

            francisu Francis Upton
            mjmac mjmac
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: