Skip to content

Commit

Permalink
Retry using a different pod when the node shutdown.
Browse files Browse the repository at this point in the history
When the node shutdown then the retry pod will always be the same pod
because it can not recognise that the pod can not work anymore and
k8s can not delete the pod before the node recovers and it causes the retry is actually not to work.

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

Fix #6558

Signed-off-by: yuzhipeng <zpyu@alauda.io>
  • Loading branch information
yuzp1996 committed Apr 22, 2023
1 parent a0b5cc5 commit bf509a7
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 bf509a7

Please sign in to comment.