Skip to content

Commit

Permalink
Merge pull request kubernetes#4407 from brendandburns/flaky
Browse files Browse the repository at this point in the history
Return logs for failed and succeeded pods too.
  • Loading branch information
filbranden committed Feb 13, 2015
2 parents 4d14102 + 8b7dfc9 commit c214022
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 := ""
Expand Down

0 comments on commit c214022

Please sign in to comment.