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

Hooks for boot failures and recovery

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Similar Issues:

      Description

      To help unattended reocvery from startup failure, introduce the following functionalities:

      • If Jenkins fails to complete the bootup sequence, produce a marker file that captures the failure. If the boot sequence succeeds, remove this file.
      • If Jenkins fails to complete the bootup sequence, evaluate $JENKINS_HOME/boot-failure.groovy.d/* in the lexicological order

      These user-supplied script can capture additional details, raise alerts, restart Jenkins (possibly after doing any other corrective actions.)

      We should also count the repeated failures to boot, so that these scripts can try progressively aggressive measures.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/init/impl/GroovyInitScript.java
          core/src/main/java/jenkins/util/groovy/GroovyHookScript.java
          http://jenkins-ci.org/commit/jenkins/f35696b2609c2fb79b9fc709324dc902043258ae
          Log:
          JENKINS-20609 refactored script hook

          in preparation of introducing other hooks

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/init/impl/GroovyInitScript.java core/src/main/java/jenkins/util/groovy/GroovyHookScript.java http://jenkins-ci.org/commit/jenkins/f35696b2609c2fb79b9fc709324dc902043258ae Log: JENKINS-20609 refactored script hook in preparation of introducing other hooks
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/WebAppMain.java
          core/src/main/java/hudson/util/AWTProblem.java
          core/src/main/java/hudson/util/BootFailure.java
          core/src/main/java/hudson/util/ErrorObject.java
          core/src/main/java/hudson/util/HudsonFailedToLoad.java
          core/src/main/java/hudson/util/IncompatibleAntVersionDetected.java
          core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java
          core/src/main/java/hudson/util/IncompatibleVMDetected.java
          core/src/main/java/hudson/util/InsufficientPermissionDetected.java
          core/src/main/java/hudson/util/JenkinsReloadFailed.java
          core/src/main/java/hudson/util/NoHomeDir.java
          core/src/main/java/hudson/util/NoTempDir.java
          core/src/main/java/jenkins/model/Jenkins.java
          core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly
          core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly
          core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly
          core/src/main/resources/hudson/util/NoTempDir/index.jelly
          http://jenkins-ci.org/commit/jenkins/729d41cfe8493e6b39ad9ab6f8a160dcef9a6637
          Log:
          [FIXED JENKINS-20609]

          Implemented the hook

          Compare: https://github.com/jenkinsci/jenkins/compare/df858ab73678...729d41cfe849

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/WebAppMain.java core/src/main/java/hudson/util/AWTProblem.java core/src/main/java/hudson/util/BootFailure.java core/src/main/java/hudson/util/ErrorObject.java core/src/main/java/hudson/util/HudsonFailedToLoad.java core/src/main/java/hudson/util/IncompatibleAntVersionDetected.java core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java core/src/main/java/hudson/util/IncompatibleVMDetected.java core/src/main/java/hudson/util/InsufficientPermissionDetected.java core/src/main/java/hudson/util/JenkinsReloadFailed.java core/src/main/java/hudson/util/NoHomeDir.java core/src/main/java/hudson/util/NoTempDir.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly core/src/main/resources/hudson/util/NoTempDir/index.jelly http://jenkins-ci.org/commit/jenkins/729d41cfe8493e6b39ad9ab6f8a160dcef9a6637 Log: [FIXED JENKINS-20609] Implemented the hook Compare: https://github.com/jenkinsci/jenkins/compare/df858ab73678...729d41cfe849
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #3056
          JENKINS-20609 refactored script hook (Revision f35696b2609c2fb79b9fc709324dc902043258ae)
          [FIXED JENKINS-20609] (Revision 729d41cfe8493e6b39ad9ab6f8a160dcef9a6637)

          Result = SUCCESS
          kohsuke : f35696b2609c2fb79b9fc709324dc902043258ae
          Files :

          • core/src/main/java/jenkins/util/groovy/GroovyHookScript.java
          • core/src/main/java/hudson/init/impl/GroovyInitScript.java

          kohsuke : 729d41cfe8493e6b39ad9ab6f8a160dcef9a6637
          Files :

          • changelog.html
          • core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly
          • core/src/main/java/jenkins/model/Jenkins.java
          • core/src/main/java/hudson/util/InsufficientPermissionDetected.java
          • core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly
          • core/src/main/java/hudson/util/NoHomeDir.java
          • core/src/main/resources/hudson/util/NoTempDir/index.jelly
          • core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java
          • core/src/main/java/hudson/util/JenkinsReloadFailed.java
          • core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly
          • core/src/main/java/hudson/util/ErrorObject.java
          • core/src/main/java/hudson/WebAppMain.java
          • core/src/main/java/hudson/util/HudsonFailedToLoad.java
          • core/src/main/java/hudson/util/NoTempDir.java
          • core/src/main/java/hudson/util/IncompatibleVMDetected.java
          • core/src/main/java/hudson/util/AWTProblem.java
          • core/src/main/java/hudson/util/BootFailure.java
          • core/src/main/java/hudson/util/IncompatibleAntVersionDetected.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3056 JENKINS-20609 refactored script hook (Revision f35696b2609c2fb79b9fc709324dc902043258ae) [FIXED JENKINS-20609] (Revision 729d41cfe8493e6b39ad9ab6f8a160dcef9a6637) Result = SUCCESS kohsuke : f35696b2609c2fb79b9fc709324dc902043258ae Files : core/src/main/java/jenkins/util/groovy/GroovyHookScript.java core/src/main/java/hudson/init/impl/GroovyInitScript.java kohsuke : 729d41cfe8493e6b39ad9ab6f8a160dcef9a6637 Files : changelog.html core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/hudson/util/InsufficientPermissionDetected.java core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly core/src/main/java/hudson/util/NoHomeDir.java core/src/main/resources/hudson/util/NoTempDir/index.jelly core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java core/src/main/java/hudson/util/JenkinsReloadFailed.java core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly core/src/main/java/hudson/util/ErrorObject.java core/src/main/java/hudson/WebAppMain.java core/src/main/java/hudson/util/HudsonFailedToLoad.java core/src/main/java/hudson/util/NoTempDir.java core/src/main/java/hudson/util/IncompatibleVMDetected.java core/src/main/java/hudson/util/AWTProblem.java core/src/main/java/hudson/util/BootFailure.java core/src/main/java/hudson/util/IncompatibleAntVersionDetected.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/WebAppMain.java
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          test/src/test/groovy/hudson/util/BootFailureTest.groovy
          http://jenkins-ci.org/commit/jenkins/3b0e6ac02a9c5ed643ba11e4eb11b575cb491918
          Log:
          JENKINS-20609 test case

          Compare: https://github.com/jenkinsci/jenkins/compare/729d41cfe849...3b0e6ac02a9c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/WebAppMain.java test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java test/src/test/groovy/hudson/util/BootFailureTest.groovy http://jenkins-ci.org/commit/jenkins/3b0e6ac02a9c5ed643ba11e4eb11b575cb491918 Log: JENKINS-20609 test case Compare: https://github.com/jenkinsci/jenkins/compare/729d41cfe849...3b0e6ac02a9c
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #3057
          JENKINS-20609 test case (Revision 3b0e6ac02a9c5ed643ba11e4eb11b575cb491918)

          Result = UNSTABLE
          kohsuke : 3b0e6ac02a9c5ed643ba11e4eb11b575cb491918
          Files :

          • core/src/main/java/hudson/WebAppMain.java
          • test/src/test/groovy/hudson/util/BootFailureTest.groovy
          • test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3057 JENKINS-20609 test case (Revision 3b0e6ac02a9c5ed643ba11e4eb11b575cb491918) Result = UNSTABLE kohsuke : 3b0e6ac02a9c5ed643ba11e4eb11b575cb491918 Files : core/src/main/java/hudson/WebAppMain.java test/src/test/groovy/hudson/util/BootFailureTest.groovy test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins-test-harness/6a7dcd8873ede880fd0b6eb961ba37af40ded1e8
          Log:
          JENKINS-20609 test case

          Originally-Committed-As: 3b0e6ac02a9c5ed643ba11e4eb11b575cb491918

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/6a7dcd8873ede880fd0b6eb961ba37af40ded1e8 Log: JENKINS-20609 test case Originally-Committed-As: 3b0e6ac02a9c5ed643ba11e4eb11b575cb491918

            People

            • Assignee:
              Unassigned
              Reporter:
              kohsuke Kohsuke Kawaguchi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: