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

queue.xml only gets persisted on successful shutdown

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      So, if Jenkins doesn't shutdown properly, we lose the queueId. This is what we suspect as being the root case of the issue in JENKINS-30899

          [JENKINS-30909] queue.xml only gets persisted on successful shutdown

          Tom FENNELLY created issue -
          Tom FENNELLY made changes -
          Link New: This issue is blocking JENKINS-30899 [ JENKINS-30899 ]

          Tom FENNELLY added a comment -

          Tom FENNELLY added a comment - https://github.com/jenkinsci/jenkins/pull/1865
          Kristin Whetstone made changes -
          Link New: This issue is related to JENKINS-33926 [ JENKINS-33926 ]

          As part of an aside, I've been running tests on Jenkins 1.x and the 2 betas/rcs and am running into some interesting issues with saving the queue on Windows. If Jenkins is running as a process and it is stopped, it won't save a queue.xml. From looking at this pull request, this looks like it should have fixed the problem; are these cases related?

          Kristin Whetstone added a comment - As part of an aside, I've been running tests on Jenkins 1.x and the 2 betas/rcs and am running into some interesting issues with saving the queue on Windows. If Jenkins is running as a process and it is stopped, it won't save a queue.xml . From looking at this pull request, this looks like it should have fixed the problem; are these cases related?
          Kristin Whetstone made changes -
          Link New: This issue is related to JENKINS-34281 [ JENKINS-34281 ]

          Jesse Glick added a comment -

          Is this simply a duplicate of JENKINS-34281, or is it discussing something else? I am not sure what precisely “we lose the queueId” means.

          Jesse Glick added a comment - Is this simply a duplicate of JENKINS-34281 , or is it discussing something else? I am not sure what precisely “we lose the queueId” means.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 166036 ] New: JNJira + In-Review [ 182257 ]

          Tim Vail added a comment -

          Jesse – this appears to be an old issue. However, I'm finding a few issues with Jenkins and the queue persistence. Particularly on Windows.

          1. If you run Jenkins as a service then you restart the service (as opposed to telling Jenkins to exit) then there is no queue.xml created and the build queue is therefore lost.
          2. Prior situation means that if the machine is rebooted – we would probably lose the queue.
          3. Even more interesting – it appears that your fix somehow isn't working for /safeRestart or /restart. It is like /exit (which does save the queue.xml) is actually safer than /safeRestart.

          Considering all things – why don't we simply write queue.xml to the disk on every queue change? With today's HDD and SSD's – I'd think for most servers Jenkins is running on – the cost of doing so should be minimal. Compared to the writing of build logs to disk this is practically nothing. At least, why not make it an option to continuously persist the build queue (if so, then I'd think it should be on by default).

          Tim Vail added a comment - Jesse – this appears to be an old issue. However, I'm finding a few issues with Jenkins and the queue persistence. Particularly on Windows. If you run Jenkins as a service then you restart the service (as opposed to telling Jenkins to exit) then there is no queue.xml created and the build queue is therefore lost. Prior situation means that if the machine is rebooted – we would probably lose the queue. Even more interesting – it appears that your fix somehow isn't working for /safeRestart or /restart. It is like /exit (which does save the queue.xml) is actually safer than /safeRestart. Considering all things – why don't we simply write queue.xml to the disk on every queue change? With today's HDD and SSD's – I'd think for most servers Jenkins is running on – the cost of doing so should be minimal. Compared to the writing of build logs to disk this is practically nothing. At least, why not make it an option to continuously persist the build queue (if so, then I'd think it should be on by default).
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-32820 [ JENKINS-32820 ]

            olivergondza Oliver Gondža
            tfennelly Tom FENNELLY
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: