How to fix workspace deletion on slave node

138 views
Skip to first unread message

DHAVAL JAISWAL

unread,
Apr 15, 2021, 6:09:40 PM4/15/21
to jenkins...@googlegroups.com
Workspace on Slave node is deleted if the Job is not running/active from Master Jenkins for some days.

How shall I fix this issue?

While referring to some forum advising to fix hudson.model.WorkspaceCleanupThread.disabled [ false ]. However, I am unable to find this parameter.  

Guide me on how can I fix this issuer permanently & save my workspace and build.

I see one option in Jenkins is DISCARD OLD BUILD. However, I assume that check is to retain the build (to see the history) on Master Jenkins. 

If needed I can help with some more information.

Senthil Nathan

unread,
Apr 16, 2021, 1:18:23 AM4/16/21
to jenkins...@googlegroups.com
This is a system property that should be set when starting up jenkins. You would want to set hudson.model.WorkspaceCleanupThread.disabled  to true to disable deletion of workspaces.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAH5ShBiSTXMYHuhW%2Bthxj3yMAvAOQWqcxgAUJwSM7ZM4kvGBYA%40mail.gmail.com.

Björn Pedersen

unread,
Apr 16, 2021, 10:43:00 AM4/16/21
to Jenkins Users
Best idea is to avoid relying on the workspace being preserved at all . So if you  are deplyoing something, then  do it by installing/copying/whatever  the final artifacts in a place outside the workspace.

Dirk Heinrichs

unread,
Apr 16, 2021, 10:50:06 AM4/16/21
to jenkins...@googlegroups.com
Am Donnerstag, den 15.04.2021, 23:39 +0530 schrieb DHAVAL JAISWAL:

Guide me on how can I fix this issuer permanently & save my workspace and build.

Don't do that. Use an "Archive Artifacts" post build step in your job to archive exactly those build artifacts you really need.

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
signature.asc

Senthil Nathan

unread,
Apr 16, 2021, 4:32:44 PM4/16/21
to jenkins...@googlegroups.com
Agree. You can stash artifacts generated in the workspaces to the controller. Be aware if you are using parallel builds automatic workspace deletion can cause job failures when the workspace is deleted automatically while the job is in progress. This is a known issue with Jenkins - https://issues.jenkins.io/browse/JENKINS-51724

THanks,
Senthil.

DHAVAL JAISWAL

unread,
Apr 29, 2021, 4:52:51 PM4/29/21
to Jenkins Users

Can I set the following arguments?. Will it resolve my problem

JAVA_ARGS="-Dhudson.model.WorkspaceCleanupThread.disabled=true"

Reply all
Reply to author
Forward
0 new messages