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

1.37 slave launcher prefixing breaks installations without prefix strings.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • ec2-plugin
    • None
    • 1.37

    Description

      After upgrading to 1.37, none of my spot instances would register with jenkins as a node.

      1.37 introduced the ability to add a prefix command before the launchstring for EC2UnixLaunchers (https://github.com/jenkinsci/ec2-plugin/pull/224), however if one is not using a prefix command, it breaks the launch string somehow.  The logs were showing two spaces in front of the command. 

      INFO: Launching slave agent (via Trilead SSH2 Connection):  java  -jar /tmp/slave.jar

      And when I would ssh into the slaves, there was no slave.jar running.

       

      So I patched out the prefix string here: 

      https://github.com/jenkinsci/ec2-plugin/blob/d5fbd012bf0c18e85ee85653694cf6c51ad4cd3b/src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java#L218

      To remove the prefix part:

      String launchString = "java " + (jvmopts != null ? jvmopts : "") + " -jar " + tmpDir + "/slave.jar";

      then I repackaged the plugin, upgraded to my bespoke version, and everything was working again.

      Im not sure if this is a weird bug with the trilead ssh client that doesnt like commands to be prefixed with spaces or what, but at least that fixed the issue allowing me to use 1.37

      Attachments

        Issue Links

          Activity

            mixologic Ryan Aslett created issue -
            myoung34 marc young made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-47130 [ JENKINS-47130 ]
            myoung34 marc young made changes -
            Link This issue is related to JENKINS-46869 [ JENKINS-46869 ]
            francisu Francis Upton made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            francisu Francis Upton made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            francisu Francis Upton made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              francisu Francis Upton
              mixologic Ryan Aslett
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: