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

Throttle matrix project doesn't work with label

      I've set "Maximum Concurrent Builds Per Node" to 1 and checked "Throttle Matrix master builds" and "Throttle Matrix configuration builds" in my multi configuration job which can be called by several jobs. I specified a user-defined axis with multiple values as well as a "Label expression" axis which has only one "Git_Linux" value. There are 3 slaves have this label in my build cluster.

      Under such configuration, the master job are not throttled well. When the master job is called simultaneously by different jobs, there was great possibility that this multi configuration job was to run on one node.

      It is likely something related to the label. Because when I specify the "Label expression" with name of one specified slave node, everything seems to be OK.

          [JENKINS-26205] Throttle matrix project doesn't work with label

          krizleebear added a comment -

          I see the same issue at our installation.
          When starting a matrix configuration job, all configurations will be started immediately, even if I specify

          Maximum Total Concurrent Builds = 1
          Maximum Concurrent Builds Per Node = 1
          

          I made sure I checked

          Throttle Matrix configuration builds = TRUE
          

          Hint: We also use label names instead of host names to select our slave nodes.

          Reproducing the problem:
          I provided a simple configuration XML that reproduces this error. In order to get it going, you'll need to create slave nodes with the labels

          • market_CHINA
          • market_EU
          • market_JAPAN
          • market_NAR
          • market_ROW
          • market_TW

          krizleebear added a comment - I see the same issue at our installation. When starting a matrix configuration job, all configurations will be started immediately, even if I specify Maximum Total Concurrent Builds = 1 Maximum Concurrent Builds Per Node = 1 I made sure I checked Throttle Matrix configuration builds = TRUE Hint: We also use label names instead of host names to select our slave nodes. Reproducing the problem: I provided a simple configuration XML that reproduces this error. In order to get it going, you'll need to create slave nodes with the labels market_CHINA market_EU market_JAPAN market_NAR market_ROW market_TW

          krizleebear added a comment -

          configuration file reproducing the problem. you'll need to create some nodes with given labels. see my comment on that.

          krizleebear added a comment - configuration file reproducing the problem. you'll need to create some nodes with given labels. see my comment on that.

          Oleg Nenashev added a comment -

          The issue needs to be re-checked on 1.609.3 or even in 1.625. The queue implementation has been changed significantly and there were also bugfixes for potential concurrency issues in it. Could somebody confirm this issue on these versions?

          Oleg Nenashev added a comment - The issue needs to be re-checked on 1.609.3 or even in 1.625. The queue implementation has been changed significantly and there were also bugfixes for potential concurrency issues in it. Could somebody confirm this issue on these versions?

          C Girard added a comment -

          We are currently on 1.609.3 and see the same issue. Our setup has similar characteristics:

          • using labels to select nodes rather than machine names
          • "throttle matrix master builds" = TRUE
          • throttle category FOO with "maximum concurrent builds per node" = 1

          We see that when running 2 different jobs that are throttled on FOO, the master builds of both jobs can run on the same node at the same time.

          C Girard added a comment - We are currently on 1.609.3 and see the same issue. Our setup has similar characteristics: using labels to select nodes rather than machine names "throttle matrix master builds" = TRUE throttle category FOO with "maximum concurrent builds per node" = 1 We see that when running 2 different jobs that are throttled on FOO, the master builds of both jobs can run on the same node at the same time.

          Oleg Nenashev added a comment -

          The last fix in the Queue logic was in 2.18: https://github.com/jenkinsci/jenkins/commit/65d904827f9364988d0eeaca4dba16e722091e93 . TCB plugin has been also reworked significantly over last years.

          I have tried to reproduce it on 2.60.2 and the last plugin version. It seems to work fine. Does anybody still see the issue?

          Oleg Nenashev added a comment - The last fix in the Queue logic was in 2.18: https://github.com/jenkinsci/jenkins/commit/65d904827f9364988d0eeaca4dba16e722091e93 . TCB plugin has been also reworked significantly over last years. I have tried to reproduce it on 2.60.2 and the last plugin version. It seems to work fine. Does anybody still see the issue?

          mcrooney added a comment -

          Yes, still seeing here. We are trying with the following Job DSL in a matrixJob:

           

          throttleConcurrentBuilds {
            maxTotal(1)
            maxPerNode(1)
            throttleMatrixBuilds(true)
            throttleMatrixConfigurations(true)
          }
          

          I've also tried configuring a throttling category that works well for other non-matrix jobs, but same behavior. It will run all of the different configurations in parallel. Jenkins 2.73.1 and TCB 1.9.0.

           

          mcrooney added a comment - Yes, still seeing here. We are trying with the following Job DSL in a matrixJob:   throttleConcurrentBuilds { maxTotal(1) maxPerNode(1) throttleMatrixBuilds( true ) throttleMatrixConfigurations( true ) } I've also tried configuring a throttling category that works well for other non-matrix jobs, but same behavior. It will run all of the different configurations in parallel. Jenkins 2.73.1 and TCB 1.9.0.  

          We still see the problem in 2020, Jenklins: 2.237, Matrix Project plugin: 1.14, Throttle concurrent build plugin: 2.0.2

          Gavriel Fleischer added a comment - We still see the problem in 2020, Jenklins: 2.237, Matrix Project plugin: 1.14, Throttle concurrent build plugin: 2.0.2

            Unassigned Unassigned
            iaadoa Thomas Li
            Votes:
            10 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: