Status: Resolved (View Workflow)
Platform: All, OS: All
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.
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
So a matrix project workspace is deleted after 30 days since last axis
- is related to
JENKINS-3841 WorkspaceCleanupThread deletes shared workspaces
JENKINS-21023 WorkspaceCleanupThread does not handle folders
This needs to be confirmed to still be an issue on 1.551+ which changed how the workspace cleanup works.
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.
I have the same issue on
- Jenkins ver. 1.569
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.
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.
Also see issue 3841.