ovn-controller-vtep.at: Remove all 'Broken pipe' warning logs from
authorAlex Wang <alexw@nicira.com>
Sat, 22 Aug 2015 16:26:54 +0000 (09:26 -0700)
committerAlex Wang <alexw@nicira.com>
Mon, 24 Aug 2015 21:29:56 +0000 (14:29 -0700)
ovsdb-server.log.

This commit makes the OVN_CONTROLLER_VTEP_STOP remove all 'Broken pipe'
warning logs from ovsdb-server.log before running 'check_log'.  This is in
that *ctl command (e.g. ovn-nbctl) exits right after committing the change
to database;  however, in reaction, some daemon (e.g. ovn-controller-vtep)
may immediately update the database;  this later update may cause database
sending update back to *ctl command if *ctl has not proceeded to exit yet;
and if *ctl command exits before database calling send, the send will fail
with 'Broken pipe' error.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
tests/ovn-controller-vtep.at

index 72ec6ae..9fc1526 100644 (file)
@@ -82,7 +82,15 @@ m4_define([OVN_CONTROLLER_VTEP_START],
 # So many exits... Yeah, we started a lot daemons~
 #
 m4_define([OVN_CONTROLLER_VTEP_STOP],
-  [AT_CHECK([check_logs $1])
+  [# removes all 'Broken pipe' warning logs from ovsdb-server.log.  this is in
+   # that *ctl command (e.g. ovn-nbctl) exits right after committing the change
+   # to database.  however, in reaction, some daemon (e.g. ovn-controller-vtep)
+   # may immediately update the database.  this later update may cause database
+   # sending update back to *ctl command if *ctl has not proceeded to exit yet.
+   # and if *ctl command exits before database calling send, the send from
+   # database will fail with 'Broken pipe' error.
+   AT_CHECK([sed -i '/Broken pipe/d' ovsdb-server.log])
+   AT_CHECK([check_logs $1])
    AT_CHECK([ovs-appctl -t ovs-vtep exit])
    AT_CHECK([ovs-appctl -t ovn-northd exit])
    AT_CHECK([ovs-appctl -t ovn-controller-vtep exit])