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

Jenkins should fail initialization if it can not parse a job history

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Linux/tomcat - Jenkins version 1.436
    • Similar Issues:
      Show 5 results

      Description

      If the file

      configuration/jobs/<job>/nextBuildNumber

      is empty, Jenkins will still initialize but the job will "disappear" from the dashboard. This will be logged, but may go unnoticed.

      Oct 27, 2011 3:10:24 PM jenkins.model.Jenkins$6 onTaskFailed
      SEVERE: Failed Loading job accurev_trigger
      hudson.util.IOException2: <path>/configuration/jobs/<job>/nextBuildNumber doesn't contain a number

        Attachments

          Activity

          Hide
          emanuelez emanuelez added a comment -

          I'm taking a look at this. The problem here is wether we want to
          1) fix the root cause (finding out why the nextBuildNumber file is empty)
          2) fixing the symptom (inserting an appropriate number in the file)
          3) setting up a notification system to tell the user what happened and how to fix it.

          Right now I'm taking a look at option 2) which is in theory the ugliest solution but also one that does not require user intervention

          Show
          emanuelez emanuelez added a comment - I'm taking a look at this. The problem here is wether we want to 1) fix the root cause (finding out why the nextBuildNumber file is empty) 2) fixing the symptom (inserting an appropriate number in the file) 3) setting up a notification system to tell the user what happened and how to fix it. Right now I'm taking a look at option 2) which is in theory the ugliest solution but also one that does not require user intervention
          Hide
          emanuelez emanuelez added a comment -
          Show
          emanuelez emanuelez added a comment - My fix is here: https://github.com/jenkinsci/jenkins/pull/303
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Emanuele Zattin
          Path:
          changelog.html
          core/src/main/java/hudson/model/Job.java
          http://jenkins-ci.org/commit/jenkins/8affa6d912f2f0777487990f2d7ef2813a19b04c
          Log:
          [FIXED JENKINS-11563]

          It would be better to find out why the nextBuildNumber is at times empty.
          In the mean time this will find the appropriate number and write it to the file.

          Compare: https://github.com/jenkinsci/jenkins/compare/3fb9bdb...8affa6d

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Emanuele Zattin Path: changelog.html core/src/main/java/hudson/model/Job.java http://jenkins-ci.org/commit/jenkins/8affa6d912f2f0777487990f2d7ef2813a19b04c Log: [FIXED JENKINS-11563] It would be better to find out why the nextBuildNumber is at times empty. In the mean time this will find the appropriate number and write it to the file. Compare: https://github.com/jenkinsci/jenkins/compare/3fb9bdb...8affa6d
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Given that the write to the nextBuildNumber is protected in the atomic write, I'm not sure how it can be empty, but I'm merging pull #303 anyway as a defensive measure.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Given that the write to the nextBuildNumber is protected in the atomic write, I'm not sure how it can be empty, but I'm merging pull #303 anyway as a defensive measure.
          Hide
          pickgr1 pickgr added a comment -

          When we've seen this happen, it's usually due to some catastrophic event where the hard drive has crashed or the server that Jenkins was running on was not gracefully shutdown (power-outage). It's happened enough times though that I think this will be a very beneficial improvement for us. Thanks!

          Show
          pickgr1 pickgr added a comment - When we've seen this happen, it's usually due to some catastrophic event where the hard drive has crashed or the server that Jenkins was running on was not gracefully shutdown (power-outage). It's happened enough times though that I think this will be a very beneficial improvement for us. Thanks!
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1262
          [FIXED JENKINS-11563]

          Kohsuke Kawaguchi : 8affa6d912f2f0777487990f2d7ef2813a19b04c
          Files :

          • core/src/main/java/hudson/model/Job.java
          • changelog.html
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1262 [FIXED JENKINS-11563] Kohsuke Kawaguchi : 8affa6d912f2f0777487990f2d7ef2813a19b04c Files : core/src/main/java/hudson/model/Job.java changelog.html

            People

            • Assignee:
              Unassigned
              Reporter:
              pickgr1 pickgr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: