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

Rebuild Plugin triggering same job multiple times on slaves simultaneously

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      https://wiki.jenkins-ci.org/display/JENKINS/Rebuild+Plugin

      I have been using a really old version of Jenkins (Jenkins ver. 1.595) for our CI machines, (rebuilder 1.22) but recently decided to try and update Jenkins and the Plugins to the latest and greatest.

      Since doing so, one of the issues I have encountered is when running "rebuild" on a build using all slaves, normally Jenkins would select the most appropriate slave, usually the last one used for that specific job (quite clever).. After updating Jenkins to 1.6.45 and then 1.6.46, and rebuild plugin 1.25

      The duplicate jobs appear to have the specific slave names in, rather than before they were just referred to as "all", but despite calling "all" as the node, they have the slave name in the data in the queue.

      Since I have 9 slaves, I end up with the same job running simultaneously 9 times.

        Attachments

          Activity

          Hide
          duncanbell Duncan Bell added a comment -

          I tried to downgrade the rebuild plugin to 1.22, using the "downgrade" button, but after restarting Jenkins it has come back with 1.25 with no further option to downgrade again. I could perhaps copy the plugin from an older instance of Jenkins I still having running instead if this helps?

          Show
          duncanbell Duncan Bell added a comment - I tried to downgrade the rebuild plugin to 1.22, using the "downgrade" button, but after restarting Jenkins it has come back with 1.25 with no further option to downgrade again. I could perhaps copy the plugin from an older instance of Jenkins I still having running instead if this helps?
          Hide
          duncanbell Duncan Bell added a comment -

          For testing I have copied over rebuild 1.22 on a Jenkins 1.6.46, and am still getting the same behaviour where clicking rebuild node=all triggers the same job on all my slaves, where as before it would just select one slave and run the job once.

          It appears that in Jenkins 1.595, all jobs run on the slaves would retain the node label of "all", but with this new incorrect behaviour, they seem to have the node=slavename

          I am going to check if using the old version of the ssh-slaves plugin (1.9) instead of 1.10 helps things.

          Show
          duncanbell Duncan Bell added a comment - For testing I have copied over rebuild 1.22 on a Jenkins 1.6.46, and am still getting the same behaviour where clicking rebuild node=all triggers the same job on all my slaves, where as before it would just select one slave and run the job once. It appears that in Jenkins 1.595, all jobs run on the slaves would retain the node label of "all", but with this new incorrect behaviour, they seem to have the node=slavename I am going to check if using the old version of the ssh-slaves plugin (1.9) instead of 1.10 helps things.
          Hide
          duncanbell Duncan Bell added a comment -

          Trying my older version of ssh-slaves plugin (1.9) has the same behaviour as 1.10.

          The job starts off with...

          (pending—Waiting for next available executor on all)

          Then spawns to all slaves instead of just one...

          Show
          duncanbell Duncan Bell added a comment - Trying my older version of ssh-slaves plugin (1.9) has the same behaviour as 1.10. The job starts off with... (pending—Waiting for next available executor on all) Then spawns to all slaves instead of just one...
          Hide
          duncanbell Duncan Bell added a comment -

          Hi

          I think my issue is actually with this plugin NodeLabel Parameter Plugin.. which has changed its behaviour... I was using 1.5.1 and in 1.7 it changes to spawn to every slave...

          https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin

          https://issues.jenkins-ci.org/browse/JENKINS-22185

          Thanks

          Show
          duncanbell Duncan Bell added a comment - Hi I think my issue is actually with this plugin NodeLabel Parameter Plugin.. which has changed its behaviour... I was using 1.5.1 and in 1.7 it changes to spawn to every slave... https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin https://issues.jenkins-ci.org/browse/JENKINS-22185 Thanks
          Hide
          amuniz Antonio Muñiz added a comment -

          As I noted in JENKINS-22185, you were relying in a bug so there is nothing to fix in this plugin.
          If you select "all" then the build will be scheduled to run in "all" nodes, nothing wrong. Unless you can provide an example of configuration where the expected behaviour is not what you get, I would close this issue as "Won't fix".

          Show
          amuniz Antonio Muñiz added a comment - As I noted in JENKINS-22185 , you were relying in a bug so there is nothing to fix in this plugin. If you select "all" then the build will be scheduled to run in "all" nodes, nothing wrong. Unless you can provide an example of configuration where the expected behaviour is not what you get, I would close this issue as "Won't fix".
          Hide
          duncanbell Duncan Bell added a comment -

          So there is no way for your plugin to random select one of N number of slaves to run the job on, but only every run the job once on one slave? As I have used the plugin the way I have for so long, I cannot see why someone would want to run the same job x 20 slaves... I build VM's for example, so only want one copy of each VM, so the jobs are distributed out to slaves, then the data copied back to the master...

          Show
          duncanbell Duncan Bell added a comment - So there is no way for your plugin to random select one of N number of slaves to run the job on, but only every run the job once on one slave? As I have used the plugin the way I have for so long, I cannot see why someone would want to run the same job x 20 slaves... I build VM's for example, so only want one copy of each VM, so the jobs are distributed out to slaves, then the data copied back to the master...
          Hide
          amuniz Antonio Muñiz added a comment - - edited

          So there is no way for your plugin to random select one of N number of slaves to run the job on

          It's not my plugin. I think it's not possible (based on the documentation). You can file it as a new feature (and propose a fix if you are able).

          I cannot see why someone would want to run the same job x 20 slaves

          It's a legitimate use case for others.

          Show
          amuniz Antonio Muñiz added a comment - - edited So there is no way for your plugin to random select one of N number of slaves to run the job on It's not my plugin. I think it's not possible (based on the documentation ). You can file it as a new feature (and propose a fix if you are able). I cannot see why someone would want to run the same job x 20 slaves It's a legitimate use case for others.
          Hide
          duncanbell Duncan Bell added a comment -

          Thanks, I will look at raising a feature request to make the plugin work as it has done for the past zillion years. Until then I can just deploy the working older version of the plugin I have.

          Show
          duncanbell Duncan Bell added a comment - Thanks, I will look at raising a feature request to make the plugin work as it has done for the past zillion years. Until then I can just deploy the working older version of the plugin I have.

            People

            Assignee:
            amuniz Antonio Muñiz
            Reporter:
            duncanbell Duncan Bell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: