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

sh step stuck on when adding inheritFrom in the kubernetes agent section

    Details

    • Similar Issues:

      Description

      After upgraded the kubernetes-plugin to 1.18.0, all of my pipelines hanging on in the one of shell step, and it ended up with the following error.

      process apparently never started in /home/jenkins/workspace/playaround@tmp/durable-3833ccbe
       (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
      

      After a deep investigation, I've reproduced the issue with the following minimal pipeline code.

      pipeline {
          agent {
              kubernetes {
                  label 'playaround'
                  containerTemplate(name: 'busybox', image: 'busybox', command: 'cat', ttyEnabled: true)
                  inheritFrom 'default'
              }
          }
          
          stages {
              stage('debug') {
                  steps {
                      sh "echo in steps"
      
                      script {
                          sh "echo in script"
      
                          container('busybox') {
      
                              sh "echo in busybox container"
                          }
                      }
                  }
              }
          }
      }
      

      It hanging on in the last sh step inside of the `busybox` container.
      and it works if I using the default `jnlp` container or by removing the `inheritFrom` from agent definition.

      This is a major issue for running the pipelines using kubernetes plugin.

      as the workaround, I've rollback to the version `1.17.3`, all works.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                csanchez Carlos Sanchez
                Reporter:
                jubel jubel han
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: