Log stdout/stderr during error
Paunch does not currently show stdout/stderr from the docker cmd when an error happens. Without this output, there is no way to tell what actually caused the container command to fail. Log the output with LOG.error if we get an unexpected return code so that the actual error is displayed to the user. Change-Id: I951cdf0cb2bfd87a22a239ff7522ab5bba9d6eb6 Closes-Bug: #1707948
This commit is contained in:
parent
efdcacc0de
commit
64df79c70d
@ -67,9 +67,13 @@ class ComposeV1Builder(object):
|
|||||||
|
|
||||||
if returncode not in exit_codes:
|
if returncode not in exit_codes:
|
||||||
LOG.error("Error running %s. [%s]\n" % (cmd, returncode))
|
LOG.error("Error running %s. [%s]\n" % (cmd, returncode))
|
||||||
|
LOG.error("stdout: %s" % cmd_stdout)
|
||||||
|
LOG.error("stderr: %s" % cmd_stderr)
|
||||||
deploy_status_code = returncode
|
deploy_status_code = returncode
|
||||||
else:
|
else:
|
||||||
LOG.debug('Completed $ %s' % ' '.join(cmd))
|
LOG.debug('Completed $ %s' % ' '.join(cmd))
|
||||||
|
LOG.info("stdout: %s" % cmd_stdout)
|
||||||
|
LOG.info("stderr: %s" % cmd_stderr)
|
||||||
return stdout, stderr, deploy_status_code
|
return stdout, stderr, deploy_status_code
|
||||||
|
|
||||||
def delete_missing_and_updated(self):
|
def delete_missing_and_updated(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user