• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • remoting
    • None

      In Jenkins common SSH and JNLP slaves do not dump logs to the disk by default. It complicates the analysis of connectivity issues.

      Requirements:

      • After specifying an option, remoting starts forwarding its logs to the disk
      • Logs are being put to a special directory, which may potentially contain additional files
      • By default Jenkins should not enable this directory since there are many potential compatibility issues (alternative - create it in the .jenkins directory with a kind of unique ID for the remoting instance)
      • Nice2Have: These logs can be rotated easily using internal settings or external mechanisms

          [JENKINS-39369] Automatically dump agent logs to the disk

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - Partial fix: https://github.com/jenkinsci/remoting/pull/129

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          README.md
          docs/logging.md
          docs/workDir.md
          src/main/java/hudson/remoting/Engine.java
          src/main/java/hudson/remoting/FileSystemJarCache.java
          src/main/java/hudson/remoting/Launcher.java
          src/main/java/hudson/remoting/TeeOutputStream.java
          src/main/java/hudson/remoting/jnlp/Main.java
          src/main/java/org/jenkinsci/remoting/engine/WorkDirManager.java
          src/test/java/org/jenkinsci/remoting/engine/WorkDirManagerTest.java
          http://jenkins-ci.org/commit/remoting/76c9b8ccf14f7def1141565b0dee2e4d1c5508d4
          Log:
          [JENKINS-39370,JENKINS-39369] - Support of work directories in Remoting (#129)

          • [JENKINS-39370,JENKINS-39369] - Add workDir parameter and automatically create logs there if specified
          • Save the progress
          • JENKINS-39370 - Generalize the workspace manager for Java Web Start
          • JENKINS-39370 - Restrict the range of supported symbols in the remoting work directory
          • JENKINS-39130 - Allow specifying flag for failing initialization if workdir is missing
          • JENKINS-39370 - @stephenc noticed that workDir may be null, Intellij IDEA adoption fun
          • JENKINS-39370 - Another message, which likely breaks the CI instance
          • JENKINS-39817 - Introduce the agentLog parameter in remoting.jnlp.Main

          @stephenc suggested doing it in the PR, so I decided to address it as a part of JENKINS-39370.
          But the code still has initialization in hudson.remoting.Launcher for other logging modes.

          • Enable JUL logging to a log-rotated file by default
          • JENKINS-18578 - If workspace manager is defined, use JAR Cache within its interbal directory
          • JENKINS-39370 - Fix the workDirManager's log initialization in Launcher
          • JENKINS-39369 - Make JUL logging system configurable via property file
          • JENKINS-39369 - Fixes in logging management after the manual testing
          • JENKINS-39369 - Respect configuration being passed from java.util.logging.config.file system property

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: README.md docs/logging.md docs/workDir.md src/main/java/hudson/remoting/Engine.java src/main/java/hudson/remoting/FileSystemJarCache.java src/main/java/hudson/remoting/Launcher.java src/main/java/hudson/remoting/TeeOutputStream.java src/main/java/hudson/remoting/jnlp/Main.java src/main/java/org/jenkinsci/remoting/engine/WorkDirManager.java src/test/java/org/jenkinsci/remoting/engine/WorkDirManagerTest.java http://jenkins-ci.org/commit/remoting/76c9b8ccf14f7def1141565b0dee2e4d1c5508d4 Log: [JENKINS-39370,JENKINS-39369] - Support of work directories in Remoting (#129) [JENKINS-39370,JENKINS-39369] - Add workDir parameter and automatically create logs there if specified Save the progress JENKINS-39370 - Generalize the workspace manager for Java Web Start JENKINS-39370 - WiP - Save progress in the test suite JENKINS-39370 - Add tests for WorkDirManager JENKINS-39370 - Restrict the range of supported symbols in the remoting work directory JENKINS-39370 - Generalize the workspace initialization checks JENKINS-39130 - Allow specifying flag for failing initialization if workdir is missing JENKINS-39370 - Reference DirType in WorkDirManager Javadocs JENKINS-39370 - @stephenc noticed that workDir may be null, Intellij IDEA adoption fun JENKINS-39370 - Seems this message breaks our CI JENKINS-39370 - Another message, which likely breaks the CI instance JENKINS-39370 - Simplify the log handling logic JENKINS-39817 - Introduce the agentLog parameter in remoting.jnlp.Main @stephenc suggested doing it in the PR, so I decided to address it as a part of JENKINS-39370 . But the code still has initialization in hudson.remoting.Launcher for other logging modes. Enable JUL logging to a log-rotated file by default JENKINS-18578 - If workspace manager is defined, use JAR Cache within its interbal directory JENKINS-39370 - Fix the workDirManager's log initialization in Launcher JENKINS-39370 - Draft the documentation JENKINS-39369 - Make JUL logging system configurable via property file JENKINS-39369 - Fixes in logging management after the manual testing JENKINS-39369 - Add tests for the logging subsystem JENKINS-39369 - Respect configuration being passed from java.util.logging.config.file system property

          Oleg Nenashev added a comment -

          The feature has been integrated into Jenkins 2.68

          Oleg Nenashev added a comment - The feature has been integrated into Jenkins 2.68

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

              Created:
              Updated:
              Resolved: