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

WorkspaceCleanupThread deletes shared workspaces

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:
      Show 5 results

      Description

      I'm using the custom workspace option to share workspaces between multiple jobs,
      but the WorkspaceCleanupThread doesn't seem to think that the shared workspaces
      are owned by any job, and deletes them every night.
      I've had this bug for quite a while have seem various bugs opened and closed for
      it, but it never seems to be fixed for me. Currently running build 309.

      I'd be fine with turning off workspace cleanup if there is a way. I'm using
      "Matrix-based security", if that comes into play to figure out the bug.

      5-Jun-2009 1:38:21 AM hudson.model.AsyncPeriodicWork$1 run
      INFO: Finished Workspace clean-up. 170976 ms

      5-Jun-2009 1:38:21 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/hudson/jobs/kernel-drivers-6.3.0/workspace is the last
      workspace for hudson.matrix.MatrixProject@722dd500[kernel-drivers-6.3.0]

      5-Jun-2009 1:38:21 AM hudson.model.WorkspaceCleanupThread
      FINER: Directory /home/hudson/jobs/kernel-drivers-6.3.0/workspace is last built
      on hudson.model.Hudson@2260e277

      5-Jun-2009 1:38:21 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/hudson/jobs/.svn/workspace is not owned by any project

      5-Jun-2009 1:38:21 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/continuous-iteam_6_3_0 is only 5 min 56
      sec old, so not deleting

      5-Jun-2009 1:38:21 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/iteam_buildrpm_6_3_0 is only 2 days 9 hr
      old, so not deleting

      5-Jun-2009 1:36:52 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/continuous is not owned by any project

      5-Jun-2009 1:36:52 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/continuous-iteam_6_2_0 is only 3 min 50
      sec old, so not deleting

      5-Jun-2009 1:36:52 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/continuous-iteam_6_1_0 is only 32 min old,
      so not deleting

      5-Jun-2009 1:36:52 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/iteam_qidmap_deltas is only 2 days 9 hr
      old, so not deleting

      5-Jun-2009 1:36:52 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/iteam_buildrpm_6_2_0 is only 2 days 9 hr
      old, so not deleting

      5-Jun-2009 1:36:52 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/iteam_buildrpm_6_1_0 is only 2 days 9 hr
      old, so not deleting

      5-Jun-2009 1:36:02 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/brad is not owned by any project

      5-Jun-2009 1:36:02 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/brad-util is only 1 day 3 hr old, so not
      deleting

      5-Jun-2009 1:35:31 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/official is not owned by any project

      5-Jun-2009 1:35:31 AM hudson.model.WorkspaceCleanupThread shouldBeDeleted
      FINE: Directory /home/build/workspace/oem-6.3.0 is the last workspace for
      hudson.model.FreeStyleProject@7ef255c7[oem-6.3.0]

      5-Jun-2009 1:35:31 AM hudson.model.WorkspaceCleanupThread
      FINER: Directory /home/build/workspace/oem-6.3.0 is last built on
      hudson.slaves.DumbSlave@cf892648

      5-Jun-2009 1:35:30 AM hudson.model.AsyncPeriodicWork$1 run
      INFO: Started Workspace clean-up

        Attachments

          Issue Links

            Activity

            Hide
            mdonohue mdonohue added a comment -

            Also see issue 4501.

            Show
            mdonohue mdonohue added a comment - Also see issue 4501.
            Hide
            kutzi kutzi added a comment -

            FYI: meanwhile we have hudson.model.WorkspaceCleanupThread.disabled system property to disable the cleanup thread - see https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

            Still, I think that Jenkins shouldn't delete custom workspaces which are still in use per-default.

            Show
            kutzi kutzi added a comment - FYI: meanwhile we have hudson.model.WorkspaceCleanupThread.disabled system property to disable the cleanup thread - see https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties Still, I think that Jenkins shouldn't delete custom workspaces which are still in use per-default.
            Hide
            jared_richardson jared richardson added a comment -

            This is causing a huge problem for our installations. We've set the environment variable like so:

            java -jar jenkins.war -Dhudson.model.WorkspaceCleanupThread.disabled=true

            But it has no effect. We're running 1.419 (but upgrading as I type this).

            Show
            jared_richardson jared richardson added a comment - This is causing a huge problem for our installations. We've set the environment variable like so: java -jar jenkins.war -Dhudson.model.WorkspaceCleanupThread.disabled=true But it has no effect. We're running 1.419 (but upgrading as I type this).
            Hide
            jared_richardson jared richardson added a comment -

            Found our problem at least. We needed to have the -D come before the -jar bit.

            java -Dhudson.model.WorkspaceCleanupThread.disabled=true -jar jenkins.war

            This is still a bad "feature". Don't delete things without tell me about it.

            Show
            jared_richardson jared richardson added a comment - Found our problem at least. We needed to have the -D come before the -jar bit. java -Dhudson.model.WorkspaceCleanupThread.disabled=true -jar jenkins.war This is still a bad "feature". Don't delete things without tell me about it.
            Hide
            kutzi kutzi added a comment -

            Fixed with JENKINS-8880

            Show
            kutzi kutzi added a comment - Fixed with JENKINS-8880

              People

              • Assignee:
                Unassigned
                Reporter:
                brad_borgald brad_borgald
              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: