Skip to content

Commit

Permalink
k8s executor: throw NodeTerminationException on node shutdown (#2590)
Browse files Browse the repository at this point in the history
Signed-off-by: phue <[email protected]>
  • Loading branch information
phue authored Jan 25, 2022
1 parent c3677c3 commit 084c8d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class K8sClient {
// this may happen when K8s node is shutdown and the pod is evicted
// therefore process exception is thrown so that the failure
// can be managed by the nextflow as re-triable execution
throw new ProcessFailedException("Unable to find pod $name - The pod may be evicted by a node shutdown event")
throw new NodeTerminationException("Unable to find pod $name - The pod may be evicted by a node shutdown event")
}
throw err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package nextflow.k8s.client
import javax.net.ssl.HttpsURLConnection

import nextflow.exception.NodeTerminationException
import nextflow.exception.ProcessFailedException
import spock.lang.Specification
/**
*
Expand Down Expand Up @@ -499,7 +498,7 @@ class K8sClientTest extends Specification {
1 * client.podStatus(POD_NAME) >> { throw new K8sResponseException("Request GET /api/v1/namespaces/xyz/pods/nf-xyz/status returned an error code=404", new ByteArrayInputStream(JSON.bytes)) }

and:
thrown(ProcessFailedException)
thrown(NodeTerminationException)
}

def 'should fail to get pod state' () {
Expand Down

0 comments on commit 084c8d6

Please sign in to comment.