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

thinbackup doesn't actually put jenkins into quiet mode if there are no jobs running

    XMLWordPrintable

Details

    Description

      if jenkins is already idle (in that no jobs are running), and the "Wait until Jenkins/Hudson is idle to perform a backup" option is selected, jenkins will never enter quiet state.

      In waitUntilIdleAndSwitchToQuietMode(): https://github.com/jenkinsci/thin-backup-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/thinbackup/utils/Utils.java#L101 it only actually switches to quiet mode if there are still jobs running by the time the timeout time has passed. this means that if jenkins is idle when the backup is triggered, jenkins will not enter quiet mode, the backup can start, and then jenkins is able to freely start any other job while the backup is in the middle of running

      Note there's also a potential problem if any jobs are blocking jobs. If quiet mode is enabled while a blocking job is running, then the downstream will never start (never leave the queue) and then you'll have total deadlock where neither the backup nor build can continue

      Attachments

        Activity

          pearlj Josh Pearl created issue -
          pearlj Josh Pearl made changes -
          Field Original Value New Value
          Description if jenkins is already idle (in that no jobs are running), and the "Wait until Jenkins/Hudson is idle to perform a backup" option is selected, jenkins will never enter quiet state.

          In waitUntilIdleAndSwitchToQuietMode(): https://github.com/jenkinsci/thin-backup-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/thinbackup/utils/Utils.java#L101 it only actually switches to quiet mode if there are still jobs running by the time the timeout time has passed. this means that if jenkins is idle when the backup is triggered, jenkins will not enter quiet mode, the backup can start, and then jenkins is able to freely start any other job while the backup is in the middle of running
          if jenkins is already idle (in that no jobs are running), and the "Wait until Jenkins/Hudson is idle to perform a backup" option is selected, jenkins will never enter quiet state.

          In waitUntilIdleAndSwitchToQuietMode(): https://github.com/jenkinsci/thin-backup-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/thinbackup/utils/Utils.java#L101 it only actually switches to quiet mode if there are still jobs running by the time the timeout time has passed. this means that if jenkins is idle when the backup is triggered, jenkins will not enter quiet mode, the backup can start, and then jenkins is able to freely start any other job while the backup is in the middle of running

          Note there's also a potential problem if any jobs are blocking jobs. If quiet mode is enabled while a blocking job is running, then the downstream will never start (never leave the queue) and then you'll have total deadlock where neither the backup nor build can continue
          pearlj Josh Pearl made changes -
          Priority Minor [ 4 ] Critical [ 2 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 159370 ] JNJira + In-Review [ 179960 ]

          People

            tofuatjava Thomas Fürer
            pearlj Josh Pearl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: