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

Restricting a job to the label of a slave that is offline

XMLWordPrintable

      When restricting a job to the label of a slave that is offline, upon running the job, the job will sit in the build queue awaiting that slaves return. If another slave in the meantime, that is online and available, is set to the same label, the job will not run on it(which it should).

      Steps to recreate:
      1. Node1 is assigned label "x". Take it offline.
      2. Run the job that is assigned to label "x".
      3. The job is now sitting in the build queue.
      3. Remove the label from Node1, and assign Node2 the label "x".
      4. The job does not run until Node1 is brought back online. Note that Node1 no longer has any label assigned to it.

      I stepped through the code and realized that this plugin actually assigns the job to the Node1 computer name at build time. So whichever node the label was assigned to at build time, becomes the node the job is attached to. The label is never re-evaluated, and consequently the job never sees that there is in fact a label "x" available(Node2).

            ikedam ikedam
            joshshinn Joshua Shinn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: