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

"Restrict where this project can be run"-Option not available for Matrix builds

    Details

    • Similar Issues:

      Description

      Hi,

      were facing this annoying Problem since several months.
      We're having a Matrix Build that can only be run successfully on the Master Hudson Node.
      But every time a Slave Node is online and this build is started it starts on the Slave-Node and of course fails.
      So we wanted to set this Matrix-Build to only run on Master-Hudson-Node but this option is not available in the configuration Page.

      Is it possible to make this option available for matrix build jobs ?

      thanks in advance,

      Robert

        Attachments

          Issue Links

            Activity

            Hide
            millenix Phil Miller added a comment -

            #9531 proposes a particular form of solution to this issue

            Show
            millenix Phil Miller added a comment - #9531 proposes a particular form of solution to this issue
            Hide
            jottorice Jonathan Rice added a comment -

            Ah, I figured out two work-arounds. The first solution, which had been staring me in the face, and I think may have been implied in one or two previous comments, is to add a "Slaves" matrix axis with just one value, "master". This makes all of the per-configuration jobs run on the master. Combined with the "Matrix Tie Parent" plugin, to also tie the parent task to "master", we then have all jobs running on the master, and not on any slave nodes. The second solution is to use the "NodeLabel Parameter" plugin, to add a node parameter "master" to the matrix build. This also makes all of the per-configuration jobs run on the master, and with the "Matrix Tie Parent" plugin once again taking care of tying the parent job to the master, we have a full solution.

            Show
            jottorice Jonathan Rice added a comment - Ah, I figured out two work-arounds. The first solution, which had been staring me in the face, and I think may have been implied in one or two previous comments, is to add a "Slaves" matrix axis with just one value, "master". This makes all of the per-configuration jobs run on the master. Combined with the "Matrix Tie Parent" plugin, to also tie the parent task to "master", we then have all jobs running on the master, and not on any slave nodes. The second solution is to use the "NodeLabel Parameter" plugin, to add a node parameter "master" to the matrix build. This also makes all of the per-configuration jobs run on the master, and with the "Matrix Tie Parent" plugin once again taking care of tying the parent job to the master, we have a full solution.
            Hide
            jottorice Jonathan Rice added a comment -

            I think I'm hitting the same issue as the original poster. Perhaps I can clarify the failure scenario. Say you have a matrix build called "Matrix", with a single axis of user-defined values "p1", "p2", ... "p5". And say you want all of that build to run on the Master node, and not on another slave node "node1". AFAICS, six tasks are kicked off for such a build - the parent (flyweight) task "Matrix", plus a task for each configuration in the matrix: "Matrix >> p1", "Matrix >> p2", ... "Matrix >> p5". Now, with the "Matrix Tie Parent" plugin, you can succeed in pinning the parent task "Matrix" to the Master node, but this has no effect on the per-configuration tasks "Matrix >> p1", etc. So some of those will tend to run on the slave node "node1". I have not found any way to restrict where these tasks are run, as can be easily done with non-matrix jobs.

            Show
            jottorice Jonathan Rice added a comment - I think I'm hitting the same issue as the original poster. Perhaps I can clarify the failure scenario. Say you have a matrix build called "Matrix", with a single axis of user-defined values "p1", "p2", ... "p5". And say you want all of that build to run on the Master node, and not on another slave node "node1". AFAICS, six tasks are kicked off for such a build - the parent (flyweight) task "Matrix", plus a task for each configuration in the matrix: "Matrix >> p1", "Matrix >> p2", ... "Matrix >> p5". Now, with the "Matrix Tie Parent" plugin, you can succeed in pinning the parent task "Matrix" to the Master node, but this has no effect on the per-configuration tasks "Matrix >> p1", etc. So some of those will tend to run on the slave node "node1". I have not found any way to restrict where these tasks are run, as can be easily done with non-matrix jobs.
            Hide
            chr0n1x Kevin R. added a comment -

            Bump.
            Having this feature would be nice

            Show
            chr0n1x Kevin R. added a comment - Bump. Having this feature would be nice
            Hide
            drdt Don Ross added a comment -

            Okay, that does work. A little clumsy, but an acceptable workaround.

            Show
            drdt Don Ross added a comment - Okay, that does work. A little clumsy, but an acceptable workaround.

              People

              • Assignee:
                Unassigned
                Reporter:
                heinzepreller heinzepreller
              • Votes:
                5 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: