Skip to content

Commit

Permalink
Retry using different pod when node shutdown.
Browse files Browse the repository at this point in the history
When node shutdown then the retry pod will always use the same pod
because it can not recongize that the pod can not work anymore and
k8s can not delete it before the node recovered and it will cause
retry is actually not working.

I fix it by check the DeletionTimestamp to know if the pod is actually
not work any more.

Fix tektoncd#6558

Signed-off-by: yuzhipeng <zpyu@alauda.io>
  • Loading branch information
yuzp1996 committed Apr 22, 2023
1 parent a0b5cc5 commit 87072e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/pod/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ func DidTaskRunFail(pod *corev1.Pod) bool {
}
}
}
return false
// when the node shutdown the pod will be in Terminating and be deleted
return pod.DeletionTimestamp != nil
}

// IsPodArchived indicates if a pod is archived in the retriesStatus.
Expand Down

0 comments on commit 87072e1

Please sign in to comment.