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

Add option to ignore the cached list of protocols in the case the list is empty

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • remoting
    • remoting-2.60+

      At my company we have a customer, on whose instance the HTTP proxy replaces the value of the "X-Jenkins-Agent-Protocols" header by the empty string. In such case Remoting 2.60+ is unable to connect, because none of protocols gets accepted.

      I would like to add a new system property, which allows disabling the cache on supported protocols. It is not a problem solution, but it should be a good workaround in some cases. It would be also useful to improve diagnostics of such cases.

          [JENKINS-41730] Add option to ignore the cached list of protocols in the case the list is empty

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          docs/configuration.md
          src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
          http://jenkins-ci.org/commit/remoting/612cc27a3294d11ea13844d972fb44de757864c4
          Log:
          JENKINS-41730 - Add option to ignore the X-Jenkins-Agent-Protocols header (#146)

          • JENKINS-41730 - Add option to ignore the X-Jenkins-Agent-Protocols header + improve diagnostics
          • [x] Add the `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.ignoreJenkinsAgentProtocolsHeader` property, which disables the cache
          • [x] Print warning in the case if the list of supported protocols is empty
          • [x] Add documentation
          • JENKINS-41730 - Switch to org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.protocolNamesToTry according to the feedback from @stephenc
          • JENKINS-41730 - Pront the list of supported protocols iff it is not empty

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: docs/configuration.md src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java http://jenkins-ci.org/commit/remoting/612cc27a3294d11ea13844d972fb44de757864c4 Log: JENKINS-41730 - Add option to ignore the X-Jenkins-Agent-Protocols header (#146) JENKINS-41730 - Add option to ignore the X-Jenkins-Agent-Protocols header + improve diagnostics [x] Add the `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.ignoreJenkinsAgentProtocolsHeader` property, which disables the cache [x] Print warning in the case if the list of supported protocols is empty [x] Add documentation JENKINS-41730 - Switch to org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.protocolNamesToTry according to the feedback from @stephenc JENKINS-41730 - Pront the list of supported protocols iff it is not empty JENKINS-41730 - Get rid of unnecessary line breaks

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/815da8aa732baa699481828dda67dd5835ba4992
          Log:
          Update remoting to 3.5

          https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md

          Fixed issues:

          Improvements:

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/815da8aa732baa699481828dda67dd5835ba4992 Log: Update remoting to 3.5 https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md Fixed issues: JENKINS-40710 ( https://issues.jenkins-ci.org/browse/JENKINS-40710 ) - Match headers case-insensitively in `JnlpAgentEndpointResolver` in order to be compliant with HTTP2 lower-case headers. ( PR #139 ( https://github.com/jenkinsci/remoting/pull/139 ), PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41513 ( https://issues.jenkins-ci.org/browse/JENKINS-41513 ) - Prevent `NullPointerException` in `JnlpAgentEndpointResolver` when receiving a header with `null` name. ( PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41852 ( https://issues.jenkins-ci.org/browse/JENKINS-41852 ) - Fix exported object pinning logic to prevent release due to the integer overflow. ( PR #148 ( https://github.com/jenkinsci/remoting/pull/148 )) Improvements: JENKINS-41730 ( https://issues.jenkins-ci.org/browse/JENKINS-41730 ) - Add the new `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.ignoreJenkinsAgentProtocolsHeader` property, which allows specifying a custom list of supported protocols instead of the one returned by the Jenkins master. ( PR #146 ( https://github.com/jenkinsci/remoting/pull/146 )) Print the Filesystem Jar Cache directory location in the error message when this cache directory is not writable. ( PR #143 ( https://github.com/jenkinsci/remoting/pull/143 )) Replace `MimicException` with the older `ProxyException` when serializing non-serializable exceptions thrown by the remote code. ( PR #141 ( https://github.com/jenkinsci/remoting/pull/141 )) Use OID of the `ClassLoaderProxy` in error message when the proxy cannot be located in the export table. ( PR #147 ( https://github.com/jenkinsci/remoting/pull/147 ))

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/1763e6400f56da0300a44c69b9c10bcf9d2cafe9
          Log:
          Merge pull request #2751 from oleg-nenashev/remoting/3.5

          [JENKINS-40710, JENKINS-41513, JENKINS-41852, JENKINS-41730] - Update remoting to 3.5

          Compare: https://github.com/jenkinsci/jenkins/compare/def0f0d11266...1763e6400f56

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/1763e6400f56da0300a44c69b9c10bcf9d2cafe9 Log: Merge pull request #2751 from oleg-nenashev/remoting/3.5 [JENKINS-40710, JENKINS-41513, JENKINS-41852, JENKINS-41730] - Update remoting to 3.5 Compare: https://github.com/jenkinsci/jenkins/compare/def0f0d11266...1763e6400f56

          Oleg Nenashev added a comment -

          Released in Remoting 3.5 and Jenkins Jenkins 2.47

          Oleg Nenashev added a comment - Released in Remoting 3.5 and Jenkins Jenkins 2.47

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/08c5da35d3fafd5cf90143181e07f0d22f4f5d60
          Log:
          Update remoting to 3.5

          https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md

          Fixed issues:

          Improvements:

          (cherry picked from commit 815da8aa732baa699481828dda67dd5835ba4992)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/08c5da35d3fafd5cf90143181e07f0d22f4f5d60 Log: Update remoting to 3.5 https://github.com/jenkinsci/remoting/edit/master/CHANGELOG.md Fixed issues: JENKINS-40710 ( https://issues.jenkins-ci.org/browse/JENKINS-40710 ) - Match headers case-insensitively in `JnlpAgentEndpointResolver` in order to be compliant with HTTP2 lower-case headers. ( PR #139 ( https://github.com/jenkinsci/remoting/pull/139 ), PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41513 ( https://issues.jenkins-ci.org/browse/JENKINS-41513 ) - Prevent `NullPointerException` in `JnlpAgentEndpointResolver` when receiving a header with `null` name. ( PR #140 ( https://github.com/jenkinsci/remoting/pull/140 )) JENKINS-41852 ( https://issues.jenkins-ci.org/browse/JENKINS-41852 ) - Fix exported object pinning logic to prevent release due to the integer overflow. ( PR #148 ( https://github.com/jenkinsci/remoting/pull/148 )) Improvements: JENKINS-41730 ( https://issues.jenkins-ci.org/browse/JENKINS-41730 ) - Add the new `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.ignoreJenkinsAgentProtocolsHeader` property, which allows specifying a custom list of supported protocols instead of the one returned by the Jenkins master. ( PR #146 ( https://github.com/jenkinsci/remoting/pull/146 )) Print the Filesystem Jar Cache directory location in the error message when this cache directory is not writable. ( PR #143 ( https://github.com/jenkinsci/remoting/pull/143 )) Replace `MimicException` with the older `ProxyException` when serializing non-serializable exceptions thrown by the remote code. ( PR #141 ( https://github.com/jenkinsci/remoting/pull/141 )) Use OID of the `ClassLoaderProxy` in error message when the proxy cannot be located in the export table. ( PR #147 ( https://github.com/jenkinsci/remoting/pull/147 )) (cherry picked from commit 815da8aa732baa699481828dda67dd5835ba4992)

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: