Log stdout and stderr on non-zero exit status
This helps troubleshooting failures when running cfn-init. Change-Id: I601506ab05d372307bb160b198a675f048e2e9ff Closes-Bug: #1269470
This commit is contained in:
parent
2202cfdd01
commit
518c02dd0a
|
@ -188,8 +188,10 @@ class CommandRunner(object):
|
|||
self._stdout = output[0]
|
||||
self._stderr = output[1]
|
||||
if self._status:
|
||||
LOG.debug("Return code of %d after executing: '%s'" % (
|
||||
self._status, cmd))
|
||||
LOG.debug("Return code of %d after executing: '%s'\n"
|
||||
"stdout: '%s'\n"
|
||||
"stderr: '%s'" % (self._status, cmd, self._stdout,
|
||||
self._stderr))
|
||||
if self._next:
|
||||
self._next.run()
|
||||
return self
|
||||
|
|
Loading…
Reference in New Issue