Merge pull request #31383 from janetkuo/run-attach-err

Automatic merge from submit-queue

Print to stderr when attach failed

@kubernetes/kubectl
pull/6/head
Kubernetes Submit Queue 2016-08-26 00:40:15 -07:00 committed by GitHub
commit f73c684404
1 changed files with 1 additions and 1 deletions

View File

@ -479,7 +479,7 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, ns, name string, opts
opts.PodName = name
opts.Namespace = ns
if err := opts.Run(); err != nil {
fmt.Fprintf(opts.Out, "Error attaching, falling back to logs: %v\n", err)
fmt.Fprintf(opts.Err, "Error attaching, falling back to logs: %v\n", err)
req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: ctrName})
if err != nil {
return err