[JIRA] (JENKINS-58779) LogRotator stops cleaning, if a build directory has been deleted externally

10 views
Skip to first unread message

martin.h.schroeder@intel.com (JIRA)

unread,
Aug 2, 2019, 5:23:02 AM8/2/19
to jenkinsc...@googlegroups.com
Martin Schröder created an issue
 
Jenkins / Bug JENKINS-58779
LogRotator stops cleaning, if a build directory has been deleted externally
Issue Type: Bug Bug
Assignee: Martin Schröder
Components: core
Created: 2019-08-02 09:22
Environment: Any (is a core Jenkins behaviour)
Labels: jenkins rotate
Priority: Minor Minor
Reporter: Martin Schröder

The deletion of a build/run in Jenkins is handled by the delete() method.

It throws an exception, when the build directory on disk has already beenremoved and stops deleting the build.

Unfortunately, the hudson.tasks.LogRotator.perform(Job<?, ?>) method does not check for this exception and will STOP cleaning up, once even just one build throws that exception.

This behaviour can be fixed in the following ways (a pull-request will be uploaded shortly):

  1. The Run.delete() method must still unlink the job, even if the build directory has been removed externally.
  2. The log output of Run.delete() must be made less verbose (it prints the ENTIRE folder content by default, into the job that is doing the cleanup)
  3. The LogRotator.perform() method must handle the exceptions being thrown by delete() gracefully.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jsoref+jenkins@gmail.com (JIRA)

unread,
Sep 23, 2019, 3:53:02 PM9/23/19
to jenkinsc...@googlegroups.com
Change By: Josh Soref
Status: Open Fixed but Unreleased
Resolution: Fixed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jsoref+jenkins@gmail.com (JIRA)

unread,
Sep 23, 2019, 3:53:02 PM9/23/19
to jenkinsc...@googlegroups.com
Josh Soref stopped work on Bug JENKINS-58779
 
Change By: Josh Soref
Status: In Progress Open

jsoref+jenkins@gmail.com (JIRA)

unread,
Sep 23, 2019, 3:53:02 PM9/23/19
to jenkinsc...@googlegroups.com
Josh Soref started work on Bug JENKINS-58779
 
Change By: Josh Soref
Status: Open In Progress

jsoref+jenkins@gmail.com (JIRA)

unread,
Sep 23, 2019, 3:54:02 PM9/23/19
to jenkinsc...@googlegroups.com
Josh Soref updated an issue
The deletion of a build/run in Jenkins is handled by the {{ delete() }}  method.


It throws an exception, when the build directory on disk has already beenremoved been removed and stops deleting the build.


Unfortunately, the {{ hudson.tasks.LogRotator.perform(Job<?, ?>) }}  method does not check for this exception and will STOP _STOP_ cleaning up, once even just one build throws that exception.


This behaviour can be fixed in the following ways (a pull-request will be uploaded shortly):
# The {{ Run.delete() }}  method must still unlink the job, even if the build directory has been removed externally.
# The log output of
{{ Run.delete() }}  must be made less verbose (it prints the ENTIRE folder content by default, into the job that is doing the cleanup)
# The
{{ LogRotator.perform() }}  method must handle the exceptions being thrown by {{ delete() }}  gracefully.

 

dbeck@cloudbees.com (JIRA)

unread,
Sep 24, 2019, 10:39:03 AM9/24/19
to jenkinsc...@googlegroups.com
Change By: Daniel Beck
Status: Fixed but Unreleased Closed
Released As: jenkins-2.196
Reply all
Reply to author
Forward
0 new messages