From 518c02dd0a5b6746205de924dde11fd893a86308 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 12 Feb 2014 15:16:49 +0100 Subject: Log stdout and stderr on non-zero exit status This helps troubleshooting failures when running cfn-init. Change-Id: I601506ab05d372307bb160b198a675f048e2e9ff Closes-Bug: #1269470 --- heat_cfntools/cfntools/cfn_helper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'heat_cfntools') diff --git a/heat_cfntools/cfntools/cfn_helper.py b/heat_cfntools/cfntools/cfn_helper.py index e699e6e..9579194 100644 --- a/heat_cfntools/cfntools/cfn_helper.py +++ b/heat_cfntools/cfntools/cfn_helper.py @@ -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 -- cgit v1.2.1