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

durable-task v1.31 breaks sh steps in pipeline when running in a Docker container

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      1.33

      Description

      A pipeline like this:

      pipeline {
          agent {
              docker {
                  label 'docker'
                  image 'busybox'
              }
          }
          stages {
              stage("Test sh script in container") {
                  steps {
                    sh label: 'Echo "Hello World...', script: 'echo "Hello World!"'
                  }
              }
          }
      }
      

      Fails with this log:

      Running in Durability level: PERFORMANCE_OPTIMIZED
      [Pipeline] Start of Pipeline (hide)
      [Pipeline] node
      Running on docker-node in /...
      [Pipeline] {
      [Pipeline] isUnix
      [Pipeline] sh
      + docker inspect -f . busybox
      .
      [Pipeline] withDockerContainer
      got-legaci-3 does not seem to be running inside a container
      $ docker run -t -d -u 1002:1002 -w <<hidden>> busybox cat
      $ docker top 645fd28fda5fa3c61a4b49e8a38e46e0eec331ddf6037d3f77821dd6984a185f -eo pid,comm
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Test sh script in container)
      [Pipeline] sh (Echo "Hello World...)
      process apparently never started in /...
      (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      $ docker stop --time=1 645fd28fda5fa3c61a4b49e8a38e46e0eec331ddf6037d3f77821dd6984a185f
      $ docker rm -f 645fd28fda5fa3c61a4b49e8a38e46e0eec331ddf6037d3f77821dd6984a185f
      [Pipeline] // withDockerContainer
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -2
      Finished: FAILURE
      

      Adding the -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true parameter gives this log:

      Running in Durability level: PERFORMANCE_OPTIMIZED
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on docker-node in /...
      [Pipeline] {
      [Pipeline] isUnix
      [Pipeline] sh
      + docker inspect -f . busybox
      .
      [Pipeline] withDockerContainer
      got-legaci-3 does not seem to be running inside a container
      $ docker run -t -d -u 1002:1002 -w <<hidden>> busybox cat
      $ docker top 31b7474756f8ff5b1f0d12d0df952347e584b47113108d1f965adeeb0ee78e5e -eo pid,comm
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Test sh script in container)
      [Pipeline] sh (Echo "Hello World...)
      OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"/var/jenkins/caches/durable-task/durable_task_monitor_1.31_unix_64\": stat /var/jenkins/caches/durable-task/durable_task_monitor_1.31_unix_64: no such file or directory": unknown
      process apparently never started in /...
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      $ docker stop --time=1 31b7474756f8ff5b1f0d12d0df952347e584b47113108d1f965adeeb0ee78e5e
      $ docker rm -f 31b7474756f8ff5b1f0d12d0df952347e584b47113108d1f965adeeb0ee78e5e
      [Pipeline] // withDockerContainer
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -2
      Finished: FAILURE
      

      Tested on three different Jenkins masters with similar, but no identical, configurations.

      Reverting to Durable Task Plugin v. 1.30 "solves" the problem.

        Attachments

          Issue Links

            Activity

            njesper Jesper Andersson created issue -
            njesper Jesper Andersson made changes -
            Field Original Value New Value
            Environment Centos 7.7
            Jenkins ver. 2.190.1
            Durable Task Plugin v. 1.31
            Centos 7.7
            Jenkins ver. 2.190.1 (installed by yum)
            Durable Task Plugin v. 1.31
            aaronpi Aaron Pellman-Isaacs made changes -
            Link This issue is duplicated by JENKINS-59906 [ JENKINS-59906 ]
            reinholdfuereder Reinhold F├╝reder made changes -
            Link This issue is related to JENKINS-59907 [ JENKINS-59907 ]
            jloucky Jakub L made changes -
            Link This issue is related to JENKINS-59907 [ JENKINS-59907 ]
            njesper Jesper Andersson made changes -
            Environment Centos 7.7
            Jenkins ver. 2.190.1 (installed by yum)
            Durable Task Plugin v. 1.31
            Centos 7.7
            Jenkins ver. 2.190.1 (installed by yum, not in container)
            Durable Task Plugin v. 1.31
            danielbeck Daniel Beck made changes -
            Labels regression
            njesper Jesper Andersson made changes -
            Link This issue is duplicated by JENKINS-59939 [ JENKINS-59939 ]
            njesper Jesper Andersson made changes -
            Component/s docker [ 20834 ]
            Component/s docker-plugin [ 18724 ]
            Component/s pipeline [ 21692 ]
            carroll Carroll Chiou made changes -
            Assignee Carroll Chiou [ carroll ]
            batmat Baptiste Mathus made changes -
            Labels regression regression triaged
            carroll Carroll Chiou made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            carroll Carroll Chiou made changes -
            Released As 1.33
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            komalb08 Komal Bardia made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            dnusbaum Devin Nusbaum made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]

              People

              Assignee:
              carroll Carroll Chiou
              Reporter:
              njesper Jesper Andersson
              Votes:
              34 Vote for this issue
              Watchers:
              47 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: