From patchwork Fri Jul 15 13:15:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Richardson X-Patchwork-Id: 648815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rrY2k6ZsSz9s5Q for ; Fri, 15 Jul 2016 23:15:10 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 06BFC10D41; Fri, 15 Jul 2016 06:15:10 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 2F2FE10D3F for ; Fri, 15 Jul 2016 06:15:09 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id B85BD1620AA for ; Fri, 15 Jul 2016 07:15:08 -0600 (MDT) X-ASG-Debug-ID: 1468588507-0b32370da01a690001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id 8GBh6Nq72i6YrDaC (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Jul 2016 07:15:07 -0600 (MDT) X-Barracuda-Envelope-From: lrichard@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 15 Jul 2016 13:15:07 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33B6B46202; Fri, 15 Jul 2016 13:15:06 +0000 (UTC) Received: from thinkcentre.nc.rr.com (vpn-56-109.rdu2.redhat.com [10.10.56.109]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6FDF5Qf017249; Fri, 15 Jul 2016 09:15:05 -0400 X-CudaMail-Envelope-Sender: lrichard@redhat.com From: Lance Richardson To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-714009928 X-CudaMail-DTE: 071516 X-CudaMail-Originating-IP: 209.132.183.28 Date: Fri, 15 Jul 2016 09:15:05 -0400 X-ASG-Orig-Subj: [##CM-V1-714009928##][PATCH v2] ovn-controller-vtep: occasional failure in "binding 1" test case Message-Id: <1468588505-12841-1-git-send-email-lrichard@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 15 Jul 2016 13:15:06 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1468588507 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH v2] ovn-controller-vtep: occasional failure in "binding 1" test case X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" The ovn-controller-vtep "binding 1" test case fails occasionally due to a race with the ovs-vtep daemon. If ovs-vtep happens to execute handle_physical() after "ovs-vsctl del-port p0", but before the test script has executed "vtep-ctl del-port br-vtep p0", the latter command will fail because ovs-vtep will have already deleted p0 from the vtep db. Eliminate this race while adding an additional check to verify that ovs-vtep is working as expected by waiting for ovs-vtep to remove entries for the deleted physical ports from the vtep db. Signed-off-by: Lance Richardson Suggested-by: Darrell Ball Acked-by: Darrell Ball --- tests/ovn-controller-vtep.at | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at index c296f0e..c978137 100644 --- a/tests/ovn-controller-vtep.at +++ b/tests/ovn-controller-vtep.at @@ -225,8 +225,9 @@ AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-vtep.log | sed 's/([[- # deletes physical ports from vtep. AT_CHECK([ovs-vsctl del-port p0 -- del-port p1]) -AT_CHECK([vtep-ctl del-port br-vtep p0 -- del-port br-vtep p1]) OVS_WAIT_UNTIL([test -z "`ovn-sbctl list Chassis | grep -- br-vtep_lswitch`"]) +OVS_WAIT_UNTIL([test -z "`vtep-ctl list physical_port p0`"]) +OVS_WAIT_UNTIL([test -z "`vtep-ctl list physical_port p1`"]) # should see empty chassis column in both binding entries. AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding | cut -d ':' -f2 | tr -d ' ' | sort], [0], [dnl