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

Job is run twice on first slave using label parameter

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have multiple slaves that have multiple labels\tags. Four of those slaves are online and all 4
      have 'sales' (no quotes) as one of their labels.

      I add a label parameter to a job, and I specify 'sales' as the value (no quotes).

      The job runs fine, and it targets all four slaves. Unfortunately, it runs twice on the first slave (5 iterations total).
      If I use a NODE parameter instead, and select all 4 slaves, it runs 4 times (once on each).

      I have checked the box "Run on all nodes matching the label". I have selected "Run regardless of result" radio button. In terms of Node eligibility, I have selected "Ignore offline nodes".

      It has nothing to do with that particular slave (slaveA), because when I take it offline, and run the job again using the same label, the job is run twice on a different slave(slaveB), and only once and the other two slaves (slaveC,slaveD).

        Attachments

          Activity

          Hide
          hextank Paul Tankard added a comment - - edited

          I hit this today, it's because of computeNextLabels() doesn't remove instances of 'label' from 'nextLabels' when looking for matches and populating it in the @DataBoundConstructor in the LabelParameterValue class

          So the runs are as follows.

          (NodeA) -> NodeA -> NodeB
          Teardown
          (NodeA) -> NodeB
          Teardown
          (NodeB)

          I'm not sure if this should be a minor bug but rather major, as if it's a long or destructive job, it would more than likely yield undesirable results.

          Show
          hextank Paul Tankard added a comment - - edited I hit this today, it's because of computeNextLabels() doesn't remove instances of 'label' from 'nextLabels' when looking for matches and populating it in the @DataBoundConstructor in the LabelParameterValue class So the runs are as follows. (NodeA) -> NodeA -> NodeB Teardown (NodeA) -> NodeB Teardown (NodeB) I'm not sure if this should be a minor bug but rather major, as if it's a long or destructive job, it would more than likely yield undesirable results.
          Hide
          shivajipai Shivaji Pai added a comment -

          This issues seems to be there in 2.60.2  as well.

          Its a overload , we have a job that runs for 3 hours , the unwanted repeat is creating a overload

          Show
          shivajipai Shivaji Pai added a comment - This issues seems to be there in 2.60.2  as well. Its a overload , we have a job that runs for 3 hours , the unwanted repeat is creating a overload
          Hide
          sourish Sourish Banerjee added a comment -

          I am facing the same problem.

           

          Do we have a fix for this issue ?

          Show
          sourish Sourish Banerjee added a comment - I am facing the same problem.   Do we have a fix for this issue ?
          Hide
          xter Benjamin Dewez added a comment -

          We have the same issue on our Jenkins instance. 

          Jenkins: 2.73.1
          Plugin: Node and Label Parameter Plugin 1.7.2
          Redhat 7

          Show
          xter Benjamin Dewez added a comment - We have the same issue on our Jenkins instance.  Jenkins: 2.73.1 Plugin: Node and Label Parameter Plugin 1.7.2 Redhat 7
          Hide
          hum3 Humphrey Lui added a comment -

          Can you get the expected behavior after checking "Execute concurrent builds if necessary" ?

          Show
          hum3 Humphrey Lui added a comment - Can you get the expected behavior after checking "Execute concurrent builds if necessary" ?
          Hide
          jaystan Jason Stanley added a comment -

          Also hitting this problem on Jenkins ver. 2.121.2 plugin version 1.7.2

          Red Hat 7

          Show
          jaystan Jason Stanley added a comment - Also hitting this problem on Jenkins ver. 2.121.2 plugin version 1.7.2 Red Hat 7

            People

            Assignee:
            domi Dominik Bartholdi
            Reporter:
            pimyjenkins Rob Pimentel
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated: