kubernetes-retired / rktlet

[EOL] The rkt implementation of the Kubernetes Container Runtime Interface
Apache License 2.0
137 stars 43 forks source link

cli: improve the logging when failed to run a command #180

Closed JulienBalestra closed 6 years ago

JulienBalestra commented 6 years ago

What does this PR do?

To improve the logging, I added the output of the command in the RunCommand.

Before:

W0210 16:29:10.157355     957 cli.go:151] rkt: cmd image [fetch --pull-policy=update --full=true docker://enjoliver.local/hyperkube:1.9.2] errored with exit status 254

After:

W0210 17:01:27.783092    3748 cli.go:152] rkt: cmd image [fetch --pull-policy=update --full=true docker://enjoliver.local/hyperkube:1.9.2] errored with exit status 254, "fetch: Get https://enjoliver.local/v2/: dial tcp 172.20.0.1:443: getsockopt: connection refused\n"