• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      Currently /restart will restart Hudson immediately, even if jobs are still running.

      In practice I usually /quietDown first, then update whatever plugins are new
      etc., then /restart only when all currently running jobs have finished. This
      ensures that jobs are not aborted unnecessarily, which can be relevant if you
      are trying to match up test failures to changelogs.

      But waiting for this to happen can take a couple of hours, so I have to be
      careful to stick around watching the dashboard waiting for the executors to
      clear. If I get distracted and forget to check for half an hour, that's up to
      half an hour of time wasted when the server is idle.

      It would be much friendlier if Hudson would just restart itself as soon as it
      finished outstanding jobs.

      Specific suggestion: if /restart or /exit is invoked,

      1. Do the equivalent of /quietDown immediately;

      2. Start listening for all executors to be idle, and actually restart or exit
      when that happens;

      3. Display a response page containing a button to restart or exit immediately.

      Should not be hard to implement, though I am not sure about #2; I can't find any
      global listener which would be notified on all Executor events (on master as
      well as slaves).

          [JENKINS-4553] Restart when ready

          Andrew Bayer added a comment -

          Taking issue since I did most of it already anyway. =)

          Andrew Bayer added a comment - Taking issue since I did most of it already anyway. =)

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23331
          Log:
          [FIXED JENKINS-4553] Along with earlier commit, added /safeExit and /safeRestart web endpoints and safe-restart CLI command

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23331 Log: [FIXED JENKINS-4553] Along with earlier commit, added /safeExit and /safeRestart web endpoints and safe-restart CLI command

            abayer Andrew Bayer
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: