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

Pipeline with docker freezes on sh commands after changing agents


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, docker, pipeline

      A pipeline that contains a docker in the highest scope level (in the declaration pipeline's code block {}) cannot change agents without the agent freezing and fails to run shell commands. This works however when the docker doesn't exist. This is easily reproducible and already contains a minimized jenkinsfile that confirms to fail and a minor change to the pipeline that shows that docker is the culprit.

      Log output: None, the console output freezes.
      After 5 minutes it states:
      process apparently never started in /var/lib/jenkins/workspace/JOB@tmp/durable-63f1as1 (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer) and fails.

      Step by step to reproduce the problem: 
      A detailed description on how to easily reproduce the bug is in the stack overflow thread:

      Circumstances: If the pipeline declaration block doesn't contain a docker block, this actually works. This is detailed in the stack overflow thread.

      For more information go to the stack overflow thread.

            csanchez Carlos Sanchez
            noamrodrik Noam Rodrik
            1 Vote for this issue
            2 Start watching this issue