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

Default jar cache location is hardcoded to ~/.jenkins/cache/jars

    XMLWordPrintable

Details

    Description

      The default jar cache location is now hardcoded to ~/.jenkins/cache/jars which is a really bad idea for a big production environment with networked home directories and multiple accounts running slaves.

      This behaviour was introduced with this commit:
      https://github.com/jenkinsci/remoting/commit/b5145a06876f4390ef3229d70fa5a7edf0739dae

      This cache location needs to be configurable.

      A bonus would be if permissions within it were handled in a way that supports multiple accounts using it. That might be the case already though.

      Attachments

        Issue Links

          Activity

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/remoting/Launcher.java
            http://jenkins-ci.org/commit/remoting/a547765c8b9cca411c2db999b53074aa2ed8d9d9
            Log:
            JENKINS-18578 - Do not use the old cache when starting agents from CLI

            Just a leftover from the previous fix, nulls are handled in hudson.remoting.Engine.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Launcher.java http://jenkins-ci.org/commit/remoting/a547765c8b9cca411c2db999b53074aa2ed8d9d9 Log: JENKINS-18578 - Do not use the old cache when starting agents from CLI Just a leftover from the previous fix, nulls are handled in hudson.remoting.Engine.

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/remoting/Launcher.java
            http://jenkins-ci.org/commit/remoting/2649c4c35350d0fcf8da3de685064a9f7f55c051
            Log:
            Merge pull request #166 from oleg-nenashev/bug/JENKINS-18578-2

            JENKINS-18578 - Do not use the old cache when starting agents from CLI

            Compare: https://github.com/jenkinsci/remoting/compare/5f7f79eb016d...2649c4c35350

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Launcher.java http://jenkins-ci.org/commit/remoting/2649c4c35350d0fcf8da3de685064a9f7f55c051 Log: Merge pull request #166 from oleg-nenashev/bug/ JENKINS-18578 -2 JENKINS-18578 - Do not use the old cache when starting agents from CLI Compare: https://github.com/jenkinsci/remoting/compare/5f7f79eb016d...2649c4c35350
            oleg_nenashev Oleg Nenashev added a comment -

            The work directory feature has been integrated towards 2.68, hence now it is possible to change the default location. Follow JENKINS-44108, which has stories for enabling work directories by default on different agent types

            oleg_nenashev Oleg Nenashev added a comment - The work directory feature has been integrated towards 2.68, hence now it is possible to change the default location. Follow JENKINS-44108 , which has stories for enabling work directories by default on different agent types
            psunjohnny Peng Sun added a comment - - edited

            I just updated jenkins from 2.58 to 2.68, after that I got:

            ...

            ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins. java.lang.RuntimeException: Root directory not writable: /folk/jenkins/.jenkins/cache/jars

            ...

            It was fine on 2.58!

            psunjohnny Peng Sun added a comment - - edited I just updated jenkins from 2.58 to 2.68, after that I got: ... ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins. java.lang.RuntimeException: Root directory not writable: /folk/jenkins/.jenkins/cache/jars ... It was fine on 2.58!
            oleg_nenashev Oleg Nenashev added a comment -

            psunjohnny The Work Dir functionality is disabled by default, but there are some extra checks in the FileJarCache logic. Please file a separate bug and attach a full stacktrace.

            oleg_nenashev Oleg Nenashev added a comment - psunjohnny The Work Dir functionality is disabled by default, but there are some extra checks in the FileJarCache logic. Please file a separate bug and attach a full stacktrace.

            People

              oleg_nenashev Oleg Nenashev
              epkabeg Andréas Berg
              Votes:
              13 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: