diff --git a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesAgentErrorCondition.java b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesAgentErrorCondition.java index cad742400..5a14c32af 100644 --- a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesAgentErrorCondition.java +++ b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesAgentErrorCondition.java @@ -128,7 +128,8 @@ public boolean test(@NonNull Throwable t, @CheckForNull StepContext context) } Set terminationReasons = ExtensionList.lookupSingleton(Reaper.class).terminationReasons(node); - if (terminationReasons.stream().allMatch(IGNORED_CONTAINER_TERMINATION_REASONS::contains)) { + if (!terminationReasons.isEmpty() + && terminationReasons.stream().allMatch(IGNORED_CONTAINER_TERMINATION_REASONS::contains)) { listener.getLogger() .println("Ignored termination reason(s) for " + node + " for purposes of retry: " + terminationReasons);