mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #110764 from soltysh/improve_msg
Improve run and debug attach message upon failure
This commit is contained in:
commit
411ecc3b62
@ -802,7 +802,7 @@ func (o *DebugOptions) handleAttachPod(ctx context.Context, f cmdutil.Factory, n
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := opts.Run(); err != nil {
|
if err := opts.Run(); err != nil {
|
||||||
fmt.Fprintf(opts.ErrOut, "Error attaching, falling back to logs: %v\n", err)
|
fmt.Fprintf(opts.ErrOut, "warning: couldn't attach to pod/%s, falling back to streaming logs: %v\n", podName, err)
|
||||||
return logOpts(f, pod, opts)
|
return logOpts(f, pod, opts)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -486,7 +486,7 @@ func handleAttachPod(f cmdutil.Factory, podClient corev1client.PodsGetter, ns, n
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := opts.Run(); err != nil {
|
if err := opts.Run(); err != nil {
|
||||||
fmt.Fprintf(opts.ErrOut, "Error attaching, falling back to logs: %v\n", err)
|
fmt.Fprintf(opts.ErrOut, "warning: couldn't attach to pod/%s, falling back to streaming logs: %v\n", name, err)
|
||||||
return logOpts(f, pod, opts)
|
return logOpts(f, pod, opts)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user