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

1.37 slave launcher prefixing breaks installations without prefix strings.



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


      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: 


      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


        Issue Links


            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 ]


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