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

WorkspaceCleanupThread deletes Matrix project workspaces

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Incomplete
    • core
    • None
    • Platform: All, OS: All

    Description

      Problem:
      A matrix project is set up to build on several slave nodes.
      Its workspace directory is cleaned at slaves even if there is a running build.

      Description:
      WorkspaceCleanupThread uses shouldBeDeleted method to determine should the
      workspace be deleted or not. It checks:
      1) was the workspace directory modified at least 30 days ago;
      2) was the project last built on the specific node.

      Matrix project workspace directory contains axis subdirectories, therefore it is
      not touched by a build. So the 1st check is passed.
      Matrix project build node points to the master. So the 2nd check is passed for a
      slave.
      So a matrix project workspace is deleted after 30 days since last axis
      configuration change.

      Attachments

        Issue Links

          Activity

            kirill_evstigneev Kirill Evstigneev created issue -
            mdonohue mdonohue added a comment -

            Also see issue 3841.

            mdonohue mdonohue added a comment - Also see issue 3841.
            kutzi kutzi made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-3841 [ JENKINS-3841 ]
            danielbeck Daniel Beck added a comment -

            This needs to be confirmed to still be an issue on 1.551+ which changed how the workspace cleanup works.

            danielbeck Daniel Beck added a comment - This needs to be confirmed to still be an issue on 1.551+ which changed how the workspace cleanup works.
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-21023 [ JENKINS-21023 ]
            danielbeck Daniel Beck added a comment -

            Resolving as 'Incomplete' after no response to comment asking for updated information in over two weeks.

            Due to the age of this issue, please file a new issue if this still occurs on recent Jenkins versions.

            danielbeck Daniel Beck added a comment - Resolving as 'Incomplete' after no response to comment asking for updated information in over two weeks. Due to the age of this issue, please file a new issue if this still occurs on recent Jenkins versions.
            danielbeck Daniel Beck made changes -
            Resolution Incomplete [ 4 ]
            Status Open [ 1 ] Resolved [ 5 ]

            I have the same issue on

            • Jenkins ver. 1.569
            • Tomcat7

            all my workspaces on a slave have been deleted:

            (updating existing workspace as expected )

            04.01.2015 01:23:20 Building remotely on machine-02 in workspace /path/to/jenkins-slave/workspace/DevOps-vagrant-up-paybackce-matrix-test1-CI/label/machine-02/vb_name/test1-cae-extint-1
            04.01.2015 01:23:21 Updating http://..../vagrant/trunk at revision '2015-01-04T01:22:00.296 +0100'
            

            WorkspaceCleanupThread was executed

            Jan 04, 2015 12:47:27 PM hudson.model.AsyncPeriodicWork$1 run
            INFO: Started Workspace clean-up
            Jan 04, 2015 12:47:30 PM hudson.model.AsyncPeriodicWork$1 run
            INFO: Finished Workspace clean-up. 3,457 ms
            Jan 04, 2015 12:57:16 PM hudson.model.Run execute
            

            (checking out new workspace - unexpected and leads to errors)

            05.01.2015 01:22:22 Building remotely on machine-02 in workspace /path/to/jenkins-slave/workspace/DevOps-vagrant-up-paybackce-matrix-test1-CI/label/machine-02/vb_name/test1-cae-extint-1
            05.01.2015 01:22:23 Checking out a fresh workspace because there's no workspace at /path/to/jenkins-slave/workspace/DevOps-vagrant-up-paybackce-matrix-test1-CI/label/machine-02/vb_name/test1-cae-extint-1
            

            I re-opened the issue so all information is in here now, I hope you agree.

            torstenreinhard Torsten Reinhard added a comment - I have the same issue on Jenkins ver. 1.569 Tomcat7 all my workspaces on a slave have been deleted: (updating existing workspace as expected ) 04.01.2015 01:23:20 Building remotely on machine-02 in workspace /path/to/jenkins-slave/workspace/DevOps-vagrant-up-paybackce-matrix-test1-CI/label/machine-02/vb_name/test1-cae-extint-1 04.01.2015 01:23:21 Updating http: //..../vagrant/trunk at revision '2015-01-04T01:22:00.296 +0100' WorkspaceCleanupThread was executed Jan 04, 2015 12:47:27 PM hudson.model.AsyncPeriodicWork$1 run INFO: Started Workspace clean-up Jan 04, 2015 12:47:30 PM hudson.model.AsyncPeriodicWork$1 run INFO: Finished Workspace clean-up. 3,457 ms Jan 04, 2015 12:57:16 PM hudson.model.Run execute (checking out new workspace - unexpected and leads to errors) 05.01.2015 01:22:22 Building remotely on machine-02 in workspace /path/to/jenkins-slave/workspace/DevOps-vagrant-up-paybackce-matrix-test1-CI/label/machine-02/vb_name/test1-cae-extint-1 05.01.2015 01:22:23 Checking out a fresh workspace because there's no workspace at /path/to/jenkins-slave/workspace/DevOps-vagrant-up-paybackce-matrix-test1-CI/label/machine-02/vb_name/test1-cae-extint-1 I re-opened the issue so all information is in here now, I hope you agree.
            torstenreinhard Torsten Reinhard made changes -
            Resolution Incomplete [ 4 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            danielbeck Daniel Beck added a comment -

            Please file a new issue as I requested above. The behavior of workspace cleanup was completely rewritten in 1.551, so whatever's wrong in later versions is likely unrelated to this report.

            That said, 1.569 is over half a year old and too old for new issue reports. I hope that's just a typo.

            Make sure to create a log recorder for the logger hudson.model.WorkspaceCleanupThread on level ALL to find out what it actually does (https://wiki.jenkins-ci.org/display/JENKINS/Logging). "Deleted all workspaces" doesn't look like the cleanup thread's behavior at all.

            Resolving as incomplete again.

            danielbeck Daniel Beck added a comment - Please file a new issue as I requested above. The behavior of workspace cleanup was completely rewritten in 1.551, so whatever's wrong in later versions is likely unrelated to this report. That said, 1.569 is over half a year old and too old for new issue reports. I hope that's just a typo. Make sure to create a log recorder for the logger hudson.model.WorkspaceCleanupThread on level ALL to find out what it actually does ( https://wiki.jenkins-ci.org/display/JENKINS/Logging ). "Deleted all workspaces" doesn't look like the cleanup thread's behavior at all. Resolving as incomplete again.
            danielbeck Daniel Beck made changes -
            Resolution Incomplete [ 4 ]
            Status Reopened [ 4 ] Resolved [ 5 ]

            See new issue JENKINS-27329

            mwebber Matthew Webber added a comment - See new issue JENKINS-27329
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 134574 ] JNJira + In-Review [ 186830 ]

            People

              Unassigned Unassigned
              kirill_evstigneev Kirill Evstigneev
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: