timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-50605] Jenkins build history disappears after reload config from disk, restart/start application, and restart managed server #9750

Open timja opened 6 years ago

timja commented 6 years ago

Jenkins version 2.117 (upgraded from 2.107.1 to try to resolve issue) is running builds but they seem to disappear from the Dashboard after a restart. I have Jenkins setup on Linux and all the log is present under ${JENKINS_HOME}/jobs/${ITEM_FULL_NAME}/builds

I have tried Reload Configuration from Disk with following set in /etc/sysconfig/jenkins

{{JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true }}

Below is build and workspace directory settings:

Workspace Root Directory :${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}

Build Record Root Directory: ${ITEM_ROOTDIR}/builds

Below you can see the build number 117 and 118 for one of my jobs, but still, the lastFailedBuild, lastStableBuild , lastSuccessfulBuild are set to -1, which doesn't exist

drwxr-xr-x 4 jenkins jenkins 4096 Apr 2 20:17 117
drwxr-xr-x 4 jenkins jenkins 4096 Apr 3 20:17 118
lrwxrwxrwx 1 jenkins jenkins 2 Apr 3 11:09 lastFailedBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 4 10:44 lastStableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 4 03:21 lastSuccessfulBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 3 10:58 lastUnstableBuild -> -1
lrwxrwxrwx 1 jenkins jenkins 2 Apr 3 10:58 lastUnsuccessfulBuild -> -1 

I have also set the

Discard Old Builds Slicer - Days to keep artifacts as 30 Discard Old Builds Slicer - Max # of builds to keep as 40

I ran the jenkins-job-checker[ https://github.com/docwhat/jenkins-job-checker ] on one of the jobs and found the following :

 Problem: NOTLINK: The number link builds/1 is not a symlink! 

Problem: NOTLINK: The number link builds/2 is not a symlink! 

Problem: NOTLINK: The number link builds/3 is not a symlink! 

Proposal: Archive non-link builds/1 

Proposal: Archive non-link builds/2 

Proposal: Archive non-link builds/3

 

Really appreaciate some help


Originally reported by rritica, imported from: Jenkins build history disappears after reload config from disk, restart/start application, and restart managed server
  • status: Open
  • priority: Blocker
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 4 years ago

vipikum2:

I am observing the same issue with one of my JOB, but for another job I can see the history even after restart the Jenkins server.

I found that plugin causing the issue: testInProgress 1.4

Option Show tests in progress under "Build Environment" was checked for the job history getting deleted.

I have unchecked the same and now I an see the build history after restart also.

My JENKINS server version: 2.190.2

Plugin: testInProgress 1.4