[ovs-dev] [PATCH] ovs-lib: Do not tee the o/p in case of strace.

Gurucharan Shetty shettyg at nicira.com
Sun Apr 7 00:02:16 UTC 2013


Looks like running the OVS daemons with strace option enabled
will block if tee is used to redirect the output. We use tee
to log the output of ovs-ctl to ovs-ctl.log

This patch disables the startup script logging when we run the
OVS daemons with the strace option.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 utilities/ovs-lib.in |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index a441c3d..a965424 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -38,8 +38,15 @@ else
 fi
 
 ovs_ctl () {
-    echo "`date -u`:$@" >> "${logdir}/ovs-ctl.log"
-    "${datadir}/scripts/ovs-ctl" "$@" 2>&1 | tee -a "${logdir}/ovs-ctl.log"
+    case "$@" in
+        *"=strace"*)
+            "${datadir}/scripts/ovs-ctl" "$@"
+        ;;
+        *)
+            echo "`date -u`:$@" >> "${logdir}/ovs-ctl.log"
+            "${datadir}/scripts/ovs-ctl" "$@" 2>&1 | tee -a "${logdir}/ovs-ctl.log"
+        ;;
+    esac
 }
 
 VERSION='@VERSION@'
-- 
1.7.9.5




More information about the dev mailing list