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

Aborted task died

XMLWordPrintable

      We're running on Google Cloud Preemptive instances. I've configured a shutdown script in the metadata.

      I've configured the shutdown script to get a list of running jobs on the node and then asks the master to "Stop" them.

      This mostly works. But occasionally it fails. 

      We have a pipeline (built using a library) which is somewhat akin to this:

      pipeline {
              agent {
                  label "katalon"
              }
              options {
                  timeout(time: 19, unit: 'MINUTES')
                  disableConcurrentBuilds()
              }
              triggers { cron('H/20 * * * *') }
              stages {
                  stage("Run tests") {
                      steps {
                          script {
                              parallelTests("katalon/*.prj", ["apple", "lemon", "peach"], "katalon")
                          }
                      }
                      post {
                          regression {
                              script {
                                  if (currentBuild.rawBuild.getActions(jenkins.model.InterruptedBuildAction.class).isEmpty()) {
                                      echo "regression"
                                  }
                              }
                          }
                          fixed {
                              echo "recovered"
                          }
                      }
                  }
              }
          }
      }
      def parallelTests(projectPath, profiles, agentLabel) {
          tests = profiles.collectEntries { profile ->
              ["${profile}": test(projectPath, profile, agentLabel)]
          }
          parallel tests
      }
      def test(projectPath, profile, agentLabel) {
          katalonPath = "/opt/katalon-studio/katalon"
          return {
              node("${agentLabel}") {
                  stage("${profile}") {
                      try {
                          checkout scm
                          fullProjectPath = "${env.WORKSPACE}/${projectPath}".toString()
                          sh new Katalon(katalonPath, fullProjectPath, profile, env.PROXY_HOST).command()
                      }
                      finally {
                          junit testResults: "katalon/reports/${profile}/**/JUnit_Report.xml"
                          archiveArtifacts artifacts: "katalon/reports/${profile}/**/JUnit_Report.xml"
                          archiveArtifacts artifacts: "katalon/reports/${profile}/**/*.png", allowEmptyArchive: true
                          archiveArtifacts artifacts: "katalon/reports/${profile}/**/*.avi", allowEmptyArchive: true
                      }
                  }
              }
          }
      }
      

      Actual results:

      Sometimes it fails like this:

      2020-01-04 23:02:29.012 INFO  c.k.k.core.webui.driver.DriverFactory    - Action delay is set to 0 seconds
      Cannot contact katalon: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel
      No test report files were found. Configuration error? 

      Expected results:

      The stop should abort the job in such a way that the job is reported as aborted, as opposed to failing.

      • Jenkins ver. 2.210
      • BlueOcean 1.21.0
      • JUnit 1.28

            Unassigned Unassigned
            jsoref Josh Soref
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: