Merge pull request #27597 from dchen1107/kubectl

Automatic merge from submit-queue

No timeout for kubectl logs

Fix #27588

cc/ @smarterclayton
This commit is contained in:
k8s-merge-robot 2016-06-17 17:48:15 -07:00 committed by GitHub
commit 04fd079d09

View File

@ -336,12 +336,8 @@ func (d *kubeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemov
} }
func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error {
ctx, cancel := getDefaultContext() // Don't set timeout for log calls
defer cancel() resp, err := d.client.ContainerLogs(context.Background(), id, opts)
resp, err := d.client.ContainerLogs(ctx, id, opts)
if ctxErr := contextError(ctx); ctxErr != nil {
return ctxErr
}
if err != nil { if err != nil {
return err return err
} }