mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Log host for failed pod
This commit is contained in:
parent
72f9e940a8
commit
18b7eda07c
@ -593,7 +593,7 @@ func VerifyContainersAreNotFailed(pod api.Pod) error {
|
|||||||
} else {
|
} else {
|
||||||
for _, status := range statuses {
|
for _, status := range statuses {
|
||||||
if status.State.Termination != nil || status.LastTerminationState.Termination != nil || status.RestartCount != 0 {
|
if status.State.Termination != nil || status.LastTerminationState.Termination != nil || status.RestartCount != 0 {
|
||||||
errStrings = append(errStrings, fmt.Sprintf("Error: Pod %s: Container %s was found to have terminated %d times", pod.Name, status.Name, status.RestartCount))
|
errStrings = append(errStrings, fmt.Sprintf("Error: Pod %s (host: %s) : Container %s was found to have terminated %d times", pod.Name, pod.Spec.Host, status.Name, status.RestartCount))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user