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

Parallel Pipeline stages on multiple nodes require n+1 executors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • pipeline
    • Jenkins ver. 2.150.3
      Jenkins Swarm Client 3.15

      Starting off with the guide in "Parallel stages with Declarative Pipeline 1.2" https://jenkins.io/blog/2017/09/25/declarative-1/ I set up a Pipeline having 4 parallel stages which can be all executed on nodes labeled with "Docker". Please note that the Pipeline does not run in a Docker container and the behavior is already observed on the base Debian OS.

      A Jenkins master is used to orchestrate the Pipeline and the master has three Linux Nodes (Label: Docker, one executor per node). By using the above sample Pipeline I would assume that having three parallel stages would spawn each stage on one of the nodes so everything runs in parallel.

      However I experience that I only see two stages running in parallel and the third one is "Waiting for next available executor". The Jenkins "Build Executor Status" table shows me in fact that I have three stages running in parallel but one stage is run twice (or at least it's listed twice). To be a bit more unfair I decided I spawn up a forth parallel step maybe it now gets balanced right but again, only two stages are build in parallel but I see three executed in the "Build Executor Status".

      The closes thing I found was JENKINS-53943

      My expectation is that I assume I can run every parallel step on its dedicated build node (as long as I have free ones) - meaning having 4 parallel stages and 3 build nodes I will have three steps running in parallel, and not two as it is right now.

      Am I missing something?

      https://jenkins.io/blog/2017/09/25/declarative-1/

        1. blue_ocean_waiting.png
          blue_ocean_waiting.png
          19 kB
        2. build_executor_status_ok.png
          build_executor_status_ok.png
          41 kB
        3. build_executor_status.png
          build_executor_status.png
          21 kB
        4. build.log
          12 kB
        5. Jenkinsfile
          3 kB

            cpo Christian Poessinger
            cpo Christian Poessinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: