From eaea63e7f4b6d5c023765906e2daf0a6fb97de8d Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 11 Mar 2015 14:33:28 +0900 Subject: [PATCH] utils.execute: Add a debug-level log to record stdin It's important to record stdin than it used to be because the recent versions of ovs_lib passes flow strings to ovs-ofctl command via stdin. Change-Id: I3b3d5742076e05a3d4ebf5adc26356742b2928e4 --- neutron/agent/linux/utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/neutron/agent/linux/utils.py b/neutron/agent/linux/utils.py index c6f2582be..447208538 100644 --- a/neutron/agent/linux/utils.py +++ b/neutron/agent/linux/utils.py @@ -70,9 +70,13 @@ def execute(cmd, process_input=None, addl_env=None, addl_env=addl_env) _stdout, _stderr = obj.communicate(process_input) obj.stdin.close() - m = _("\nCommand: %(cmd)s\nExit code: %(code)s\nStdout: %(stdout)s\n" - "Stderr: %(stderr)s") % {'cmd': cmd, 'code': obj.returncode, - 'stdout': _stdout, 'stderr': _stderr} + m = _("\nCommand: %(cmd)s\nExit code: %(code)s\nStdin: %(stdin)s\n" + "Stdout: %(stdout)s\nStderr: %(stderr)s") % \ + {'cmd': cmd, + 'code': obj.returncode, + 'stdin': process_input or '', + 'stdout': _stdout, + 'stderr': _stderr} extra_ok_codes = extra_ok_codes or [] if obj.returncode and obj.returncode in extra_ok_codes: -- 2.45.2