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

            jubel jubel han created issue -
            jubel jubel han made changes -
            Field Original Value New Value
            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.
            {code:java}
            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)
            {code}
            After a deep investigation, I've reproduced the issue with the following minimal pipeline code.
            {code:java}
            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"
                                }
                            }
                        }
                    }
                }
            }
            {code}
            t 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.
            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.
            {code:java}
            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)
            {code}
            After a deep investigation, I've reproduced the issue with the following minimal pipeline code.
            {code:java}
            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"
                                }
                            }
                        }
                    }
                }
            }
            {code}
            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.
            Hide
            vlatombe Vincent Latombe added a comment -

            Probably same as JENKINS-58766, due to JENKINS-58705.

            Show
            vlatombe Vincent Latombe added a comment - Probably same as JENKINS-58766 , due to JENKINS-58705 .
            vlatombe Vincent Latombe made changes -
            Link This issue duplicates JENKINS-58766 [ JENKINS-58766 ]
            vlatombe Vincent Latombe made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Duplicate [ 3 ]

              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: