• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Jenkins 2.387.2
      Throttle Concurrent Builds Plug-in 2.14

       

      I have one main node and 2 slave node.

      I want to limit  one task at the same time per node.

      So I set maxConcurrentPerNode: 1, maxConcurrentTotal: 0

      But it does not work!!

       

      Here is my code

      // code placeholder
      options {
          throttleJobProperty categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 1, maxConcurrentTotal: 0, paramsToUseForLimit: 'Packer', throttleEnabled: true, throttleOption: 'project'
      } 

       

          [JENKINS-71636] maxConcurrentPerNode not working

          Lev added a comment -

          We're observing the same problem with the plugin.
          Anybody may take a look at this problem?

          Lev added a comment - We're observing the same problem with the plugin. Anybody may take a look at this problem?

          Johan added a comment -

          I think the problem is that getThrottleJobProperty(Task task) lacks code for when task is a PlaceholderTask. Currently it only checks if task instanceof Job else returns null. Not sure how to fix this.

          Johan added a comment - I think the problem is that getThrottleJobProperty(Task task) lacks code for when task is a PlaceholderTask. Currently it only checks if task instanceof Job else returns null. Not sure how to fix this.

          Shannon added a comment -

          We're seeing the same issue:

          pipeline {
              agent { label 'autoqc' } 
              options {
                  disableRestartFromStage()
                  timeout(time: 1100, unit: 'SECONDS')
                  timestamps()
                  throttleJobProperty(
                      categories: ['db_autoqc'],
                      maxConcurrentPerNode: 1,
                      throttleEnabled: true,
                      throttleOption: 'category' 
                  )
              } 

          Is there a work-around for this?  Is there a replacement plugin?

          Shannon added a comment - We're seeing the same issue: pipeline {     agent { label 'autoqc' }      options {         disableRestartFromStage()         timeout(time: 1100, unit: 'SECONDS' )         timestamps()         throttleJobProperty(             categories: [ 'db_autoqc' ],             maxConcurrentPerNode: 1,             throttleEnabled: true ,             throttleOption: 'category'           )     } Is there a work-around for this?  Is there a replacement plugin?

          Shannon added a comment -

          danielbeck do you have any advice here?  I know in the past (when I worked for a different company) you were able to help us at times.

          Shannon added a comment - danielbeck do you have any advice here?  I know in the past (when I worked for a different company) you were able to help us at times.

          Shannon added a comment -

          I get the same result using throttle():

          pipeline {
              agent { label 'autoqc' } 
              options {
                  disableRestartFromStage()
                  timeout(time: 1100, unit: 'SECONDS')
                  timestamps()
                  throttle(['db_autoqc'])
              } 

          I had a freestyle job running that was also part of db_autoqc, but this pipeline job didn't care and just started running on that same node.  Manually triggered.  The global throttle configuration in settings is the same as the throttleJobProperty configuration in my previous comment.

          Shannon added a comment - I get the same result using throttle(): pipeline {     agent { label 'autoqc' }      options {         disableRestartFromStage()         timeout(time: 1100, unit: 'SECONDS' )         timestamps()         throttle([ 'db_autoqc' ])     } I had a freestyle job running that was also part of db_autoqc, but this pipeline job didn't care and just started running on that same node.  Manually triggered.  The global throttle configuration in settings is the same as the throttleJobProperty configuration in my previous comment.

            Unassigned Unassigned
            xushunwang xu
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: