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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
      None
    • Similar Issues:

      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: