• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 2.73.1
      slave-setup plugin 1.10

      When using the JNLPLauncher nested inside of a DelegatingComputerLauncher (from slave-setup plugin to start/stop instances on demand), settings such as tunnel, vmargs, and RemotingWorkDirSettings are not reflected in the provided slave-agent.jnlp.

      The problem is simply that the slave-jnlp.jar.jelly does not handle nested launchers.
      https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/java/hudson/slaves/SlaveComputer.java#L673-L676
      https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly#L62-L84
      It seems that this doesn't result in an error because field accesses in the jelly script are dynamically typed.

          [JENKINS-47056] nested JNLPLauncher settings ignored

          Martin Nowak created issue -
          Martin Nowak made changes -
          Description Original: When using the JNLPLauncher nested inside of a DelegatingComputerLauncher (from slave-setup plugin to start/stop instances on demand), settings such as [tunnel|http://javadoc.jenkins.io/hudson/slaves/JNLPLauncher.html#tunnel], [vmargs|http://javadoc.jenkins.io/hudson/slaves/JNLPLauncher.html#vmargs], and {{[RemotingWorkDirSettings}}|http://javadoc.jenkins.io/hudson/slaves/JNLPLauncher.html#getWorkDirSettings] are not reflected in the provided slave-agent.jnlp.

          The problem is simply that the slave-jnlp.jar.jelly does not handle nested launchers.
          https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/java/hudson/slaves/SlaveComputer.java#L673-L676
          https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly#L62-L84
          It seems that this doesn't result in an error because field accesses in the jelly script are dynamically typed.
          New: When using the JNLPLauncher nested inside of a DelegatingComputerLauncher (from slave-setup plugin to start/stop instances on demand), settings such as [tunnel|http://javadoc.jenkins.io/hudson/slaves/JNLPLauncher.html#tunnel], [vmargs|http://javadoc.jenkins.io/hudson/slaves/JNLPLauncher.html#vmargs], and [RemotingWorkDirSettings|http://javadoc.jenkins.io/hudson/slaves/JNLPLauncher.html#getWorkDirSettings] are not reflected in the provided slave-agent.jnlp.

          The problem is simply that the slave-jnlp.jar.jelly does not handle nested launchers.
          https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/java/hudson/slaves/SlaveComputer.java#L673-L676
          https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly#L62-L84
          It seems that this doesn't result in an error because field accesses in the jelly script are dynamically typed.

          Martin Nowak added a comment -

          Martin Nowak added a comment - https://github.com/jenkinsci/jenkins/pull/3034
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Assignee New: Martin Nowak [ dawg ]
          Oleg Nenashev made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/jenkins/pull/3034 (Web Link)" [ 17772 ]

          Code changed in jenkins
          User: Martin Nowak
          Path:
          core/src/main/java/hudson/slaves/SlaveComputer.java
          core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly
          test/src/test/java/hudson/slaves/JNLPLauncherTest.java
          http://jenkins-ci.org/commit/jenkins/257cc238fb89843531b72d387c78b6851d9d1f0c
          Log:
          JENKINS-47056 nested JNLPLauncher settings ignored

          • fixed by stripping off DelegatedComputerLaunchers and
            ComputerLauncherFilters when rendering slave-agent.jnlp

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Martin Nowak Path: core/src/main/java/hudson/slaves/SlaveComputer.java core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly test/src/test/java/hudson/slaves/JNLPLauncherTest.java http://jenkins-ci.org/commit/jenkins/257cc238fb89843531b72d387c78b6851d9d1f0c Log: JENKINS-47056 nested JNLPLauncher settings ignored fixed by stripping off DelegatedComputerLaunchers and ComputerLauncherFilters when rendering slave-agent.jnlp

          Daniel Beck added a comment -

          Fixed towards 2.83.

          Daniel Beck added a comment - Fixed towards 2.83.
          Daniel Beck made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            dawg Martin Nowak
            dawg Martin Nowak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: