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

Queue is not persisted on Safe Restart when Jenkins is installed as Windows Service (clean up is not performed)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Jenkins 1.647 installed as Windows Service

      When Jenkins is installed as Windows Service the queue is not persisted on Safe Restart.

      Steps to reproduce

      • Fresh install Jenkins on Windows as a Windows Service
      • Remove all available executors (set it to 0)
      • Configure a job
      • Run the job
      • The job must be put in queue, and must not run because there are no available executors.
      • Safe restart Jenkins

      Expected result

      • On safe restart the queue.xml file should be created for the queue to be restored on start
      • Ultimately the queue should be restored on start

      Actual result

      • No queue.xml file is created
      • The queue is not restored after restart

      This works on Mac OS X, and works if running a Jenkins instance with Maven HPI Plugin or similar on Windows.

          [JENKINS-32820] Queue is not persisted on Safe Restart when Jenkins is installed as Windows Service (clean up is not performed)

          André Carmo created issue -

          André Carmo added a comment -

          This problem happens because Jenkins.cleanUp() method is not being called on WindowsServiceLifecycle.restart() method. It is only called in the restart implementation of UnixLifecycle and SolarisSMFLifecycle. It is also called inside WebAppMain.contextDestroyed().

          Will create a pull request.

          André Carmo added a comment - This problem happens because Jenkins.cleanUp() method is not being called on WindowsServiceLifecycle.restart() method. It is only called in the restart implementation of UnixLifecycle and SolarisSMFLifecycle. It is also called inside WebAppMain.contextDestroyed(). Will create a pull request.
          André Carmo made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          André Carmo added a comment -

          Created pull request on GitHub: https://github.com/jenkinsci/jenkins/pull/2019

          André Carmo added a comment - Created pull request on GitHub: https://github.com/jenkinsci/jenkins/pull/2019
          Daniel Beck made changes -
          Assignee New: André Carmo [ atcarmo ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 168511 ] New: JNJira + In-Review [ 185684 ]
          Kyle Brennan made changes -
          Link New: This issue is duplicated by JENKINS-41775 [ JENKINS-41775 ]

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/WebAppMain.java
          core/src/main/java/hudson/lifecycle/SolarisSMFLifecycle.java
          core/src/main/java/hudson/lifecycle/UnixLifecycle.java
          core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
          http://jenkins-ci.org/commit/jenkins/579a88d6e790729159b50840dc78c0f4ae2ba5f6
          Log:
          Merge branch 'JENKINS-32820' of https://github.com/atcarmo/jenkins into bug/JENKINS-32820

          Conflicts:
          core/src/main/java/hudson/WebAppMain.java
          core/src/main/java/hudson/lifecycle/SolarisSMFLifecycle.java
          core/src/main/java/hudson/lifecycle/UnixLifecycle.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/WebAppMain.java core/src/main/java/hudson/lifecycle/SolarisSMFLifecycle.java core/src/main/java/hudson/lifecycle/UnixLifecycle.java core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java http://jenkins-ci.org/commit/jenkins/579a88d6e790729159b50840dc78c0f4ae2ba5f6 Log: Merge branch ' JENKINS-32820 ' of https://github.com/atcarmo/jenkins into bug/ JENKINS-32820 Conflicts: core/src/main/java/hudson/WebAppMain.java core/src/main/java/hudson/lifecycle/SolarisSMFLifecycle.java core/src/main/java/hudson/lifecycle/UnixLifecycle.java

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/lifecycle/SolarisSMFLifecycle.java
          core/src/main/java/hudson/lifecycle/UnixLifecycle.java
          core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
          http://jenkins-ci.org/commit/jenkins/08a993d7bcd3590ccbfa9504cd45fbba540fd354
          Log:
          JENKINS-32820 Fix the last merge issues

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/lifecycle/SolarisSMFLifecycle.java core/src/main/java/hudson/lifecycle/UnixLifecycle.java core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java http://jenkins-ci.org/commit/jenkins/08a993d7bcd3590ccbfa9504cd45fbba540fd354 Log: JENKINS-32820 Fix the last merge issues

            atcarmo André Carmo
            atcarmo André Carmo
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: