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

Launch agent by connecting to controller is missing the required information

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • libvirt-slave-plugin
    • None

      Hello!

      I am running the following Jenkins setup:

      jenkins 2.412.2 on ubuntu 22.04

      libvirt plugin: 262.v98a_c85b

       

      When I create a libvirt node with the launch setting:

      Launch agent by connecting it to the controller
      

      I would expect to see the required secret to manually connect to the jenkins controller.

      Here is how it looks like on the gui when having this setting with a normal node:

      And this it how it looks when using the libvirt plugin to create a node.

      So as a workaround I run this in my jenkins console:

      for (aSlave in hudson.model.Hudson.instance.slaves) 
      { println aSlave.name + "," + aSlave.getComputer().getJnlpMac() } 

      Where then I have acquired the secret necessary to spawn the connection from the node to the controller.

      So I created this issue is here sort of also as a possible future improvement, but also so others could also make use of this workaround.

       

      As for the background why I don't use an ssh connection.

      I need to have a working wsl on my windows, which is broken due to this bug:

      https://github.com/microsoft/WSL/issues/9231

       

      Cheers!

          [JENKINS-72147] Launch agent by connecting to controller is missing the required information

          According to Jenkins' Java Support Policy, 2.412.2 requires at least Java 11. There is no JNLP support with Java 11 anymore, so it is obvious that it does not work.

          Bastian Germann added a comment - According to Jenkins' Java Support Policy, 2.412.2 requires at least Java 11. There is no JNLP support with Java 11 anymore, so it is obvious that it does not work.

          Mate Rigo added a comment - - edited

          bgermann That is correct.

          But what that deprecation actually means is that icon you could click on:

          I found a screenshot from somewhere in the internet:

          Using the connection method I refer to is actually covered by the official Cloudbees Youtube Channel.

          https://youtu.be/N8AQTlHoBKc?t=530

           

          With JNLP prior to Java 11 you could actually just press that Launch Button and install the agent as a Windows service with a click of a Button. That is why this Video was created.

           

          And I would like to emphasize that currently no other connection method would make it possible to use WSL in your Windows Jenkins Agent.

           

          Edit: fun fact is that if you wish to use websockets to connect your agent to the controller, which is being propagated by the jenkins dev Team as a neat new feature, this is also the method which you would need to use.

           

          The JnlpAgentReceiver is still part of the jenkins core:

          https://www.jenkins.io/doc/developer/extensions/jenkins-core/#jnlpagentreceiver

          Cheers!

          Mate Rigo added a comment - - edited bgermann That is correct. But what that deprecation actually means is that icon you could click on: I found a screenshot from somewhere in the internet: Using the connection method I refer to is actually covered by the official Cloudbees Youtube Channel. https://youtu.be/N8AQTlHoBKc?t=530   With JNLP prior to Java 11 you could actually just press that Launch Button and install the agent as a Windows service with a click of a Button. That is why this Video was created.   And I would like to emphasize that currently no other connection method would make it possible to use WSL in your Windows Jenkins Agent.   Edit: fun fact is that if you wish to use websockets to connect your agent to the controller, which is being propagated by the jenkins dev Team as a neat new feature, this is also the method which you would need to use.   The JnlpAgentReceiver is still part of the jenkins core: https://www.jenkins.io/doc/developer/extensions/jenkins-core/#jnlpagentreceiver Cheers!

          Mate Rigo added a comment -

          For some extra info.

          I have just checked the latest jenkins docker controller which uses java 21

          running :

          docker run -p 8080:8080 -p 50001:50001 jenkins/jenkins:jdk21 

          Without installing any plugins, therefore having only the jenkins core the following is the only way to connect an agent to the controller:

           

           

          After setting it up, this is how the agent status page looks like:

           

          Mate Rigo added a comment - For some extra info. I have just checked the latest jenkins docker controller which uses java 21 running : docker run -p 8080:8080 -p 50001:50001 jenkins/jenkins:jdk21 Without installing any plugins, therefore having only the jenkins core the following is the only way to connect an agent to the controller:     After setting it up, this is how the agent status page looks like:  

          Michael added a comment -

          Michael added a comment - WIP: https://github.com/jenkinsci/libvirt-agent-plugin/pull/47

            m_jeanson Michael
            materigoprecitec Mate Rigo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: