Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return logs for failed and succeeded pods too. #4407

Merged
merged 1 commit into from
Feb 13, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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