From patchwork Mon Jun 7 12:49:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Michelson X-Patchwork-Id: 1488667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FclSvdio; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FzCs36bz5z9sWk for ; Mon, 7 Jun 2021 22:50:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 592D983155; Mon, 7 Jun 2021 12:50:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CA2Zni_GzXXh; Mon, 7 Jun 2021 12:50:24 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTP id 3D38283376; Mon, 7 Jun 2021 12:50:22 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8702FC0023; Mon, 7 Jun 2021 12:50:20 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9994C0001 for ; Mon, 7 Jun 2021 12:50:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9AA2E82BA1 for ; Mon, 7 Jun 2021 12:50:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ha4t8S5ucZhe for ; Mon, 7 Jun 2021 12:50:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2F6E0834BB for ; Mon, 7 Jun 2021 12:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623070206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dienRwLDhtfLET7X1s9AHME1PTfXy6nrnenm5IzPI1g=; b=FclSvdioZmkTAgvvd011Xf9soAYFDqkMjrG9tlf/BUX5HiTpN0NOg9AdPUEVY36dEuC+Kg zqhpj94YX1/Ud9AnJVYVymEzW1TygT9M1a61mGG+vGb7qDEw5jJ7/cqO967nhRK1Ay/miu 8ImCIVgErBiDVJMhKed1004VsME6DkQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-234-1ZK0RWvVM5atQ_no8C1k5A-1; Mon, 07 Jun 2021 08:50:01 -0400 X-MC-Unique: 1ZK0RWvVM5atQ_no8C1k5A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 642D8107ACCA for ; Mon, 7 Jun 2021 12:50:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-92.rdu2.redhat.com [10.10.115.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1D0E60DA0 for ; Mon, 7 Jun 2021 12:49:59 +0000 (UTC) From: Mark Michelson To: dev@openvswitch.org Date: Mon, 7 Jun 2021 08:49:58 -0400 Message-Id: <20210607124959.2748648-1-mmichels@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mmichels@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] tests: Add debugging 4 HV, 3LS, 2 LR test. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Add some checking to "4 HV, 3 LS, 2 LR, packet test with HA distributed router gateway port". Signed-off-by: Mark Michelson Acked-by: Ben Pfaff --- tests/ovn.at | 90 ++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index f26894ce4..6cda89781 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -10442,9 +10442,9 @@ net_add n1 sim_add hv1 as hv1 -ovs-vsctl add-br br-phys +check ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 -ovs-vsctl -- add-port br-int hv1-vif1 -- \ +check ovs-vsctl -- add-port br-int hv1-vif1 -- \ set interface hv1-vif1 external-ids:iface-id=foo1 \ options:tx_pcap=hv1/vif1-tx.pcap \ options:rxq_pcap=hv1/vif1-rx.pcap \ @@ -10452,19 +10452,19 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \ sim_add gw1 as gw1 -ovs-vsctl add-br br-phys +check ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.2 sim_add gw2 as gw2 -ovs-vsctl add-br br-phys +check ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.4 sim_add ext1 as ext1 -ovs-vsctl add-br br-phys +check ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.3 -ovs-vsctl -- add-port br-int ext1-vif1 -- \ +check ovs-vsctl -- add-port br-int ext1-vif1 -- \ set interface ext1-vif1 external-ids:iface-id=outside1 \ options:tx_pcap=ext1/vif1-tx.pcap \ options:rxq_pcap=ext1/vif1-rx.pcap \ @@ -10475,77 +10475,81 @@ ovs-vsctl -- add-port br-int ext1-vif1 -- \ # for ARP resolution). OVN_POPULATE_ARP -ovn-nbctl create Logical_Router name=R0 -ovn-nbctl create Logical_Router name=R1 +AT_CHECK([ovn-nbctl create Logical_Router name=R0 -- \ + create Logical_Router name=R1 | uuidfilt], [0], [<0> +<1> +]) -ovn-nbctl ls-add foo -ovn-nbctl ls-add join -ovn-nbctl ls-add alice -ovn-nbctl ls-add outside +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add join +check ovn-nbctl ls-add alice +check ovn-nbctl ls-add outside #Connect foo to R0 -ovn-nbctl lrp-add R0 R0-foo 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo foo-R0 -- set Logical_Switch_Port foo-R0 \ +check ovn-nbctl lrp-add R0 R0-foo 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo foo-R0 -- set Logical_Switch_Port foo-R0 \ type=router options:router-port=R0-foo \ -- lsp-set-addresses foo-R0 router #Connect R0 to join -ovn-nbctl lrp-add R0 R0-join 00:00:0d:01:02:03 100.60.1.1/24 -ovn-nbctl lsp-add join join-R0 -- set Logical_Switch_Port join-R0 \ +check ovn-nbctl lrp-add R0 R0-join 00:00:0d:01:02:03 100.60.1.1/24 +check ovn-nbctl lsp-add join join-R0 -- set Logical_Switch_Port join-R0 \ type=router options:router-port=R0-join \ -- lsp-set-addresses join-R0 router #Connect join to R1 -ovn-nbctl lrp-add R1 R1-join 00:00:0e:01:02:03 100.60.1.2/24 -ovn-nbctl lsp-add join join-R1 -- set Logical_Switch_Port join-R1 \ +check ovn-nbctl lrp-add R1 R1-join 00:00:0e:01:02:03 100.60.1.2/24 +check ovn-nbctl lsp-add join join-R1 -- set Logical_Switch_Port join-R1 \ type=router options:router-port=R1-join \ -- lsp-set-addresses join-R1 router #add route rules -ovn-nbctl lr-route-add R0 0.0.0.0/0 100.60.1.2 -ovn-nbctl lr-route-add R1 192.168.0.0/16 100.60.1.1 +check ovn-nbctl lr-route-add R0 0.0.0.0/0 100.60.1.2 +check ovn-nbctl lr-route-add R1 192.168.0.0/16 100.60.1.1 # Connect alice to R1 as distributed router gateway port on gw1 -ovn-nbctl lrp-add R1 alice 00:00:02:01:02:03 172.16.1.1/24 +check ovn-nbctl lrp-add R1 alice 00:00:02:01:02:03 172.16.1.1/24 -ovn-nbctl \ +AT_CHECK([ovn-nbctl \ --id=@gc0 create Gateway_Chassis name=alice_gw1 \ chassis_name=gw1 \ priority=20 -- \ --id=@gc1 create Gateway_Chassis name=alice_gw2 \ chassis_name=gw2 \ priority=10 -- \ - set Logical_Router_Port alice 'gateway_chassis=[@gc0,@gc1]' + set Logical_Router_Port alice 'gateway_chassis=[@gc0,@gc1]' | uuidfilt], [0], [<0> +<1> +]) -ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ +check ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ type=router options:router-port=alice \ -- lsp-set-addresses rp-alice router # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port outside1 in outside -ovn-nbctl lsp-add outside outside1 \ +check ovn-nbctl lsp-add outside outside1 \ -- lsp-set-addresses outside1 "f0:00:00:01:02:04 172.16.1.3" # Create localnet port in alice -ovn-nbctl lsp-add alice ln-alice -ovn-nbctl lsp-set-addresses ln-alice unknown -ovn-nbctl lsp-set-type ln-alice localnet -ovn-nbctl lsp-set-options ln-alice network_name=phys +check ovn-nbctl lsp-add alice ln-alice +check ovn-nbctl lsp-set-addresses ln-alice unknown +check ovn-nbctl lsp-set-type ln-alice localnet +check ovn-nbctl lsp-set-options ln-alice network_name=phys # Create localnet port in outside -ovn-nbctl lsp-add outside ln-outside -ovn-nbctl lsp-set-addresses ln-outside unknown -ovn-nbctl lsp-set-type ln-outside localnet -ovn-nbctl lsp-set-options ln-outside network_name=phys +check ovn-nbctl lsp-add outside ln-outside +check ovn-nbctl lsp-set-addresses ln-outside unknown +check ovn-nbctl lsp-set-type ln-outside localnet +check ovn-nbctl lsp-set-options ln-outside network_name=phys # Create bridge-mappings on gw1, gw2 and ext1, hv1 doesn't need # mapping to the external network, is the one generating packets -as gw1 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys -as gw2 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys -as ext1 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys +check as gw1 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys +check as gw2 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys +check as ext1 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys wait_for_ports_up check ovn-nbctl --wait=sb sync @@ -10587,7 +10591,7 @@ test_ip_packet() # ARP request packet to expect at outside1 #arp_request=ffffffffffff${src_mac}08060001080006040001${src_mac}${src_ip}000000000000${dst_ip} - as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet + check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet # Send ARP reply from outside1 back to the router # XXX: note, we could avoid this if we plug this port into a netns @@ -10598,7 +10602,7 @@ test_ip_packet() src_ip=`ip_to_hex 172 16 1 1` arp_reply=${src_mac}${reply_mac}08060001080006040002${reply_mac}${dst_ip}${src_mac}${src_ip} - as ext1 ovs-appctl netdev-dummy/receive ext1-vif1 $arp_reply + check as ext1 ovs-appctl netdev-dummy/receive ext1-vif1 $arp_reply OVS_WAIT_UNTIL([ test `as $active_gw ovs-ofctl dump-flows br-int | grep table=66 | \ @@ -10620,7 +10624,7 @@ grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc -l` -eq 1 as ext1 reset_pcap_file ext1-vif1 ext1/vif1 # Resend packet from foo1 to outside1 - as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet + check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet OVN_CHECK_PACKETS([ext1/vif1-tx.pcap], [ext1-vif1.expected]) $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $active_gw/br-phys_n1-tx.pcap > packets @@ -10634,14 +10638,16 @@ grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc -l` -eq 1 test_ip_packet gw1 gw2 -ovn-nbctl --wait=hv \ +AT_CHECK([ovn-nbctl --wait=hv \ --id=@gc0 create Gateway_Chassis name=alice_gw1 \ chassis_name=gw1 \ priority=10 -- \ --id=@gc1 create Gateway_Chassis name=alice_gw2 \ chassis_name=gw2 \ priority=20 -- \ - set Logical_Router_Port alice 'gateway_chassis=[@gc0,@gc1]' + set Logical_Router_Port alice 'gateway_chassis=[@gc0,@gc1]' | uuidfilt], [0], [<0> +<1> +]) test_ip_packet gw2 gw1 From patchwork Mon Jun 7 12:49:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Michelson X-Patchwork-Id: 1488666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Uwra+hqL; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FzCs21cPhz9sW6 for ; Mon, 7 Jun 2021 22:50:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 81A45402EC; Mon, 7 Jun 2021 12:50:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dI4sxbkDEW3N; Mon, 7 Jun 2021 12:50:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTP id E9EBC4037D; Mon, 7 Jun 2021 12:50:19 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C8D55C0019; Mon, 7 Jun 2021 12:50:19 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id BAB48C0001 for ; Mon, 7 Jun 2021 12:50:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9BF3F82BA1 for ; Mon, 7 Jun 2021 12:50:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W4ui2OfNgtyt for ; Mon, 7 Jun 2021 12:50:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id C1AA7833D3 for ; Mon, 7 Jun 2021 12:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623070203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ynsO9Hi22HcS+t8OYdwyT0lBXQTuqaj6YL57t+iy4YU=; b=Uwra+hqL26nXO4egfArXZON4TbGbQa5KK+xnHywUbdoL+eU0lFi30dD6IYab5iNXhTLImy lxwzLZG/4yKsunJJursE4K0poEwhFFYTs3MB6ZUcAczTn42gGY9dNUeLSR1TXAGxu4qmq1 s9bnCDM8ON5MUW11/JAiYl/oem74oL0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-QHMl42YXM0mIAXWt3rNDlw-1; Mon, 07 Jun 2021 08:50:01 -0400 X-MC-Unique: QHMl42YXM0mIAXWt3rNDlw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D91C1009469 for ; Mon, 7 Jun 2021 12:50:01 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-92.rdu2.redhat.com [10.10.115.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8A2960917 for ; Mon, 7 Jun 2021 12:50:00 +0000 (UTC) From: Mark Michelson To: dev@openvswitch.org Date: Mon, 7 Jun 2021 08:49:59 -0400 Message-Id: <20210607124959.2748648-2-mmichels@redhat.com> In-Reply-To: <20210607124959.2748648-1-mmichels@redhat.com> References: <20210607124959.2748648-1-mmichels@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mmichels@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 2/2] tests: Fix consistency of 4 HV, 3LS, 2 LR test runs. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Much like the 4 HV, 1 LS, 1 LR test, this one was also having issues where the pcap file would not be reset before attempting to capture packets. Therefore, the pcap file would be reset after having captured packets we were expecting to see. Therefore, this patch does similarly to 879ebc8c6, in that it adds the following: * Ensure that pcap file is reset before continuing * Ensure that HA flows are installed before testing packets. Signed-off-by: Mark Michelson Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1941061 Acked-by: Ben Pfaff --- tests/ovn.at | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 6cda89781..4e84639b5 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -10566,15 +10566,12 @@ wait_column "$hv1_ch_uuid" HA_Chassis_Group ref_chassis # Allow some time for ovn-northd and ovn-controller to catch up. check ovn-nbctl --wait=hv sync -reset_pcap_file() { - local iface=$1 - local pcap_file=$2 - ovs-vsctl -- set Interface $iface options:tx_pcap=dummy-tx.pcap \ -options:rxq_pcap=dummy-rx.pcap - rm -f ${pcap_file}*.pcap - ovs-vsctl -- set Interface $iface options:tx_pcap=${pcap_file}-tx.pcap \ -options:rxq_pcap=${pcap_file}-rx.pcap -} +hv1_gw1_ofport=$(as hv1 ovs-vsctl --bare --columns ofport find Interface name=ovn-gw1-0) +hv1_gw2_ofport=$(as hv1 ovs-vsctl --bare --columns ofport find Interface name=ovn-gw2-0) + +OVS_WAIT_UNTIL([ + test 1 = $(as hv1 ovs-ofctl dump-flows br-int table=37 | grep -c "active_backup,ofport,members:$hv1_gw1_ofport,$hv1_gw2_ofport") +]) test_ip_packet() { @@ -10619,9 +10616,9 @@ grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc -l` -eq 1 exp_gw_ip_garp=ffffffffffff00000201020308060001080006040001000002010203ac100101000000000000ac100101 echo $exp_gw_ip_garp >> ext1-vif1.expected - as $active_gw reset_pcap_file br-phys_n1 $active_gw/br-phys_n1 - as $backup_gw reset_pcap_file br-phys_n1 $backup_gw/br-phys_n1 - as ext1 reset_pcap_file ext1-vif1 ext1/vif1 + as $active_gw reset_iface_pcap_file br-phys_n1 $active_gw/br-phys_n1 + as $backup_gw reset_iface_pcap_file br-phys_n1 $backup_gw/br-phys_n1 + as ext1 reset_iface_pcap_file ext1-vif1 ext1/vif1 # Resend packet from foo1 to outside1 check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet @@ -10649,6 +10646,10 @@ AT_CHECK([ovn-nbctl --wait=hv \ <1> ]) +OVS_WAIT_UNTIL([ + test 1 = $(as hv1 ovs-ofctl dump-flows br-int table=37 | grep -c "active_backup,ofport,members:$hv1_gw2_ofport,$hv1_gw1_ofport") +]) + test_ip_packet gw2 gw1 OVN_CLEANUP([hv1],[gw1],[gw2],[ext1])