mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
Merge pull request #4407 from brendandburns/flaky
Return logs for failed and succeeded pods too.
This commit is contained in:
commit
c2140228fc
1 changed files with 5 additions and 2 deletions
|
|
@ -1423,8 +1423,11 @@ func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName, tail stri
|
|||
return fmt.Errorf("failed to get status for pod %q - %v", podFullName, err)
|
||||
}
|
||||
}
|
||||
if podStatus.Phase != api.PodRunning {
|
||||
return fmt.Errorf("pod %q is not in 'Running' state - State: %q", podFullName, podStatus.Phase)
|
||||
switch podStatus.Phase {
|
||||
case api.PodRunning, api.PodSucceeded, api.PodFailed:
|
||||
break
|
||||
default:
|
||||
return fmt.Errorf("pod %q is not in 'Running', 'Succeeded' or 'Failed' state - State: %q", podFullName, podStatus.Phase)
|
||||
}
|
||||
exists := false
|
||||
dockerContainerID := ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue