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

Declarative pipeline: 'agent any' doesn't honour node restriction

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      I have a multibranch pipeline with a stage having 'agent any' statement.

       

      The pipeline job ended up being blocked with
      node-B is reserved for jobs with matching label expression
      despite the fact that:

      • it should not be run on this node at all (as the node should be restricted by using a label)
      • node-a had idle executors

      Expected behaviour:

      The job should be queued to any node, except those which have "only build jobs with label expressions matching this node", considering the job doesn't match the label criteria

       

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          So whatever's happening here would actually be an issue under the hood with the node step. agent any leads to calling the node step with no parameter - which should work the way you're expecting.

          Show
          abayer Andrew Bayer added a comment - So whatever's happening here would actually be an issue under the hood with the node step. agent any leads to calling the node step with no parameter - which should work the way you're expecting.
          Hide
          abayer Andrew Bayer added a comment -

          Also, can you get together a minimal reproduction case? Like, exact details on how your two relevant agents are set up and a minimal Pipeline (either Declarative or Scripted using node) that reproduces this?

          Show
          abayer Andrew Bayer added a comment - Also, can you get together a minimal reproduction case? Like, exact details on how your two relevant agents are set up and a minimal Pipeline (either Declarative or Scripted using node ) that reproduces this?

            People

            • Assignee:
              Unassigned
              Reporter:
              marmax Marian Stranecky
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: