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

Multi-Project Throttle Categories don't work with Matrix jobs

      I've set up two Multi-Project Throttle Categories, filesystem and postgres, both with maximum total concurrent builds of 0 and maximum concurrent builds per node of 1.

      This is because only one job that uses these categories can run on a host at once, if two try, they'll stomp all over each other.

      So, I've configured two jobs, both matrix jobs, and both configured with "Throttle Concurrent Builds" checked, "throttle this projects as part of one or more catogories" checked and both the categories defined above checked.

      However, when a node has more than one executor, I'll frequently see multiple configurations from the matrix being run on the same node at the same time. Sure enough, they stomp all over each other.

          [JENKINS-16521] Multi-Project Throttle Categories don't work with Matrix jobs

          Update: Cloned tag 1.7.1 and installed and it seems to work using Category.
          Created a "Matrix-job" category using "Maximum Total Concurrent Build = 4" and "Maximum Concurrent Builds Per Node = 4". The job itself is configured with "Maximum Concurrent Builds Per Node = 1" and "Maximum Total Concurrent Build = 4". I am not using any slaves though.

          Ole Christian Langfjæran added a comment - Update: Cloned tag 1.7.1 and installed and it seems to work using Category. Created a "Matrix-job" category using "Maximum Total Concurrent Build = 4" and "Maximum Concurrent Builds Per Node = 4". The job itself is configured with "Maximum Concurrent Builds Per Node = 1" and "Maximum Total Concurrent Build = 4". I am not using any slaves though.

          Chris Withers added a comment -

          Yeah, I thought it was working, and then found overlapping matrix child jobs on some slave nodes.
          So, have to default to one executor per slave, which means those slaves can't be used for any other jobs (that don't use the throttled resources), which is a waste

          Chris Withers added a comment - Yeah, I thought it was working, and then found overlapping matrix child jobs on some slave nodes. So, have to default to one executor per slave, which means those slaves can't be used for any other jobs (that don't use the throttled resources), which is a waste

          Hi Andrew(Abayer),
          Can you please fix this and release 1.7.3 fast.
          or if any one has already done fix..please do the pull request to get it merged.

          hiteswar kumar added a comment - Hi Andrew(Abayer), Can you please fix this and release 1.7.3 fast. or if any one has already done fix..please do the pull request to get it merged.

          Oleg Nenashev added a comment -

          Reassigned the issue

          Oleg Nenashev added a comment - Reassigned the issue

          Samu Wikstedt added a comment -

          Hi,
          is this behaviour somehow related to issue we've see lately with matrix jobs and throttle-plugin: throttle plugin do not recognize slave nodes that has been added after the matrix jobs has been gone to queue. Resulting those jobs going to slave nodes that has been there before job launch and new nodes doing nothing.

          Samu Wikstedt added a comment - Hi, is this behaviour somehow related to issue we've see lately with matrix jobs and throttle-plugin: throttle plugin do not recognize slave nodes that has been added after the matrix jobs has been gone to queue. Resulting those jobs going to slave nodes that has been there before job launch and new nodes doing nothing.

          Chris Withers added a comment -

          No, that sounds entirely unrelated. Please file a separate issue for that.

          Chris Withers added a comment - No, that sounds entirely unrelated. Please file a separate issue for that.

          Oleg Nenashev added a comment -

          I'd say that the issue completely duplicates JENKINS-13619.

          BTW, I've started working on the configurable behavior for Matrix projects. It should resolve both issues.

          Oleg Nenashev added a comment - I'd say that the issue completely duplicates JENKINS-13619 . BTW, I've started working on the configurable behavior for Matrix projects. It should resolve both issues.

          Hi,
          we have another issue with matrix and throttle-concurrents, I cannot say if it is related to this.

          We have 4 executors on a node and 2 matrix projects using them. Each matrix project spawns 4 jobs. Jobs from the same matrix project can run in parallel on the same node but they conflict with jobs from other projects. So we configured the two jobs with the same category and specified to run 1 job per node. Unfortunately jobs from different projects in the same category are spawned to the same node.
          We would expect to have 4 jobs from the same project... or at least 1 job from a single project and 3 free executors, not mixed project jobs.

          We did the following:

          Global configuration:
          Category Name: mock

          • Maximum Total Concurrent Builds: 0
          • Maximum Concurrent Builds Per Node: 1

          Job configurations:
          Throttle Concurrent Builds => checked
          Throttle this project as part of one or more categories => selected

          • Maximum Total Concurrent Builds: 0
          • Maximum Concurrent Builds Per Node: 1
          • Multi-Project Throttle Category: mock

          We also tried to specify the per-node global conf without any help. We also tried to set the limit for the master node (which is used as the main executor for the matrix jobs). No luck.

          Note the same configuration with other non-matrix projects works fine.

          Jenkins version: 1.559
          Throttle Concurrent Builds Plug-in version: 1.8.2

          Should I open another issue for this problem?

          Andrea Curtoni added a comment - Hi, we have another issue with matrix and throttle-concurrents, I cannot say if it is related to this. We have 4 executors on a node and 2 matrix projects using them. Each matrix project spawns 4 jobs. Jobs from the same matrix project can run in parallel on the same node but they conflict with jobs from other projects. So we configured the two jobs with the same category and specified to run 1 job per node. Unfortunately jobs from different projects in the same category are spawned to the same node. We would expect to have 4 jobs from the same project... or at least 1 job from a single project and 3 free executors, not mixed project jobs. We did the following: Global configuration: Category Name: mock Maximum Total Concurrent Builds: 0 Maximum Concurrent Builds Per Node: 1 Job configurations: Throttle Concurrent Builds => checked Throttle this project as part of one or more categories => selected Maximum Total Concurrent Builds: 0 Maximum Concurrent Builds Per Node: 1 Multi-Project Throttle Category: mock We also tried to specify the per-node global conf without any help. We also tried to set the limit for the master node (which is used as the main executor for the matrix jobs). No luck. Note the same configuration with other non-matrix projects works fine. Jenkins version: 1.559 Throttle Concurrent Builds Plug-in version: 1.8.2 Should I open another issue for this problem?

          Oleg Nenashev added a comment -

          @Andrea
          This is a similar issue.
          I'll provide a Dev Build of the plugin in JENKINS-13619

          Oleg Nenashev added a comment - @Andrea This is a similar issue. I'll provide a Dev Build of the plugin in JENKINS-13619

          Oleg Nenashev added a comment -

          Marking as duplicate.
          Let's track the further activity in JENKINS-13619

          Oleg Nenashev added a comment - Marking as duplicate. Let's track the further activity in JENKINS-13619

            oleg_nenashev Oleg Nenashev
            cjw296 Chris Withers
            Votes:
            12 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: