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

Resuming a build when agent restarts/crashes


    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins LTS 2.190.1
    • Similar Issues:


      A specific scenario is when an agent crashes or looses network connectivity. This scenario is currently not supported but much of the required structure is already a part of Jenkins and with some modifications Jenkins could be made to recover in this situation.

      Each job has a directory on disk that contains a 'build' directory with numbered subdirectories under it corresponding to build numbers. This directory is created when the job starts. Upon completion of a build a file named build.xml is written. This file stores statistics about the build (duration, result success or failure, start time etc.) also included in this data are the parameters of the build for parameterized builds. This is the mechanism that implements the "Rebuild Last" button on parameterized builds.

      The build.xml file is currently only written when a build completes so if an agent crashes or  gets disconnected the information required to rebuild the job has not yet been written and cannot be used for recovery. By changing Jenkins to write this file when the build starts and update it as the build progresses it would be possible to have enough information on disk to automatically restart a build that failed due to an agent crash or disconnection.



          There are no comments yet on this issue.


            • Assignee:
              santoshy santoshy Yalamanchili
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: