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

Triggering a build with a parameterized node label is stuck in Pending - waiting for executors...

      When trying to manually build a Multi-configuration project with parameters the build never gets past the Queue phase. Attempted to create a 2nd project that will trigger the multi-configuration project on a different node from master and same result. If parameters are removed the build will run on all nodes selected without issue.

      Job Config:
      Checked -> Parameterized
      Name: HOST_NAME
      Default Nodes: master
      Possible Nodes: [Selected Nodes]
      Allow multi node selection concurrent builds
      Node eligibility: Ignore Offline Nodes
      Checked -> Execute concurrent builds if necessary

      No Advanced Project Options (Restrict, Quiet, Retry, Blocking, Custom)

      Source Code Management: GIT

      Configuration Matrix
      Slaves ->
      Name: label
      Node/Label: Individual Nodes (Valid Nodes selected)

      Build:
      Powershell Scripts

      Post Build:
      Editable Email Notification (Default Settings)

      Queue Message:

      #4 (pending—Waiting for next available executor on [Node Name]) [NodeParameterValue: HOST_NAME=[Node Name]

      All the Executors are open and other jobs can be ran on the selected Nodes.

          [JENKINS-22226] Triggering a build with a parameterized node label is stuck in Pending - waiting for executors...

          ikedam added a comment -

          Sounds not related to parameterized-trigger plugin.
          Removed parameterized-trigger from components.

          ikedam added a comment - Sounds not related to parameterized-trigger plugin. Removed parameterized-trigger from components.

          Oleg Nenashev added a comment -

          The issue is in LabelParameterValue.java:112
          The code sets the warning text instead of the label value, hence the job won't be ever executed due to the non-existent label. Such issue appears if a NodeEligibility extension returns false for the selected node.

          if (StringUtils.isBlank(getLabel()))

          Unknown macro: { // these artificial label will cause the job to stay in the queue and the user will see this label setLabel(Messages.LabelParameterValue_triggerWithoutValidOnlineNode(StringUtils.join(labels, ','))); }

          Reproduction steps:

          1) Disable a node
          2) Run job on the node by specifiing the NodeLabelParameter
          – The job should hang in queue
          3) Enable the node
          Expected result: node takes the job
          Actual result: job infinitely hangs, because it cannot find the label "Not valid node for label X"

          Oleg Nenashev added a comment - The issue is in LabelParameterValue.java:112 The code sets the warning text instead of the label value, hence the job won't be ever executed due to the non-existent label. Such issue appears if a NodeEligibility extension returns false for the selected node. if (StringUtils.isBlank(getLabel())) Unknown macro: { // these artificial label will cause the job to stay in the queue and the user will see this label setLabel(Messages.LabelParameterValue_triggerWithoutValidOnlineNode(StringUtils.join(labels, ','))); } Reproduction steps: 1) Disable a node 2) Run job on the node by specifiing the NodeLabelParameter – The job should hang in queue 3) Enable the node Expected result: node takes the job Actual result: job infinitely hangs, because it cannot find the label "Not valid node for label X"

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - The issue has been caused by https://github.com/jenkinsci/nodelabelparameter-plugin/commit/c84f71466823c726420ab2f6af7dd989cf766bf7 from Domi

          Daniel Beck added a comment -

          Appears to not be a core issue, only auto-assigned by component deletion.

          Daniel Beck added a comment - Appears to not be a core issue, only auto-assigned by component deletion.

          Donald Kwakkel added a comment - - edited

          Is there a workaround without restarting jenkins to get the job from the queue?

          Donald Kwakkel added a comment - - edited Is there a workaround without restarting jenkins to get the job from the queue?

          I also suffer from this problem. Any solution?

          Heiko Böttger added a comment - I also suffer from this problem. Any solution?

          Oleg Nenashev added a comment -

          Here is my old pull request: https://github.com/jenkinsci/nodelabelparameter-plugin/pull/5 with a test.

          Oleg Nenashev added a comment - Here is my old pull request: https://github.com/jenkinsci/nodelabelparameter-plugin/pull/5 with a test.

            Unassigned Unassigned
            huot Justin Huot
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: