From patchwork Thu Aug 18 13:59:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1667705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.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=N75cMSvY; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M7mjX5m5Mz1yg3 for ; Thu, 18 Aug 2022 23:59:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DDFE8611AB; Thu, 18 Aug 2022 13:59:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DDFE8611AB Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N75cMSvY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j_mM06LUNe5f; Thu, 18 Aug 2022 13:59:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 50AF660C1D; Thu, 18 Aug 2022 13:59:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 50AF660C1D Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E7766C0032; Thu, 18 Aug 2022 13:59:53 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9090EC002D for ; Thu, 18 Aug 2022 13:59:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 57DC660E17 for ; Thu, 18 Aug 2022 13:59:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 57DC660E17 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B3xPXDlf1SlY for ; Thu, 18 Aug 2022 13:59:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9D22960C1D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9D22960C1D for ; Thu, 18 Aug 2022 13:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660831189; 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=vxcWZuzvelaq2i2LJnEQfnfZL0uHknoznr5k6FiLz9M=; b=N75cMSvYktyV//Qd9pPAosQM2Wmk32mH7oXYOGYFzgAOuRoXhCGh7fH9OXe3HxtA0puT0/ 1g40c9HqnkUnL81dEJkBienRmrRqm9jYvuRvQ35nA4bcoM3YAXypELh372eZc6HrSx0o1L rYy1Eis3Ia1S80OQy2k3SHOfQeZIpNU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-340-BULgCj7ZPR-M5zN8s9tWDw-1; Thu, 18 Aug 2022 09:59:40 -0400 X-MC-Unique: BULgCj7ZPR-M5zN8s9tWDw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54ECB185A79C for ; Thu, 18 Aug 2022 13:59:40 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.ntdv.lab.eng.bos.redhat.com [10.19.188.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36A1F400EAB2; Thu, 18 Aug 2022 13:59:40 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Thu, 18 Aug 2022 09:59:40 -0400 Message-Id: <20220818135940.4148571-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] tests: fix multiple flaky test cases 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" - ovn-controller incremental processing - ovn-ic -- port-bindings deletion upon TS deletion - IP packet buffering - ovn-controller-vtep - hv flows - external logical port - ovn-northd pause and resume - ACLs on Port Groups - DSCP marking and meter check - Stateless Floating IP - ovn-controller - check meters update - conflict ACLs with address - 1 LR with HA distributed router gateway port - controller event - basic connectivity with multiple requested-chassis Signed-off-by: Xavier Simonart Acked-by: Mark Michelson --- tests/ovn-controller-vtep.at | 8 +- tests/ovn-ic.at | 2 + tests/ovn-northd.at | 9 ++ tests/ovn-performance.at | 4 + tests/ovn.at | 155 ++++++++++++++++++++++++----------- 5 files changed, 127 insertions(+), 51 deletions(-) diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at index 35afeea74..73971b3f4 100644 --- a/tests/ovn-controller-vtep.at +++ b/tests/ovn-controller-vtep.at @@ -605,9 +605,13 @@ priority=110,tun_id=0x<>,in_port=<> actions=move:NXM_NX_TUN_ID[[0..23]]->OXM_OF_ # cleanup check ovn-nbctl lsp-del lsp-vtep -check as vtep1 vtep-ctl unbind-ls vtep1 p0 100 -- clear-local-macs lswitch0 \ - -- clear-remote-macs lswitch0 -- del-ls lswitch0 +check as vtep1 vtep-ctl unbind-ls vtep1 p0 100 +# vtep-ctl del-ls lswitch0 can fail due to remaining references to local-macs eventough we do vtep-ctl clear-local-macs. +# This happens if local-macs are added right before, causing our idl not to be up-to-date ; hence the clear-local-macs does not reach the db. +OVS_WAIT_UNTIL([as vtep1 vtep-ctl clear-local-macs lswitch0 \ + -- clear-remote-macs lswitch0 \ + -- del-ls lswitch0 ]) # 2nd testcase: create vlan binding on vtep and then create logical switch port for it. # ensure there's no port_binding diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at index b136472c8..0bdfc55e6 100644 --- a/tests/ovn-ic.at +++ b/tests/ovn-ic.at @@ -100,6 +100,8 @@ check ovn-nbctl lsp-add ts1 lsp1 -- \ wait_row_count Datapath_Binding 1 external_ids:interconn-ts=ts1 # check port binding appeared +OVS_WAIT_UNTIL([ovn-ic-sbctl show | grep lsp1]) + AT_CHECK([ovn-ic-sbctl show | grep -A2 lsp1], [0], [dnl port lsp1 transit switch: ts1 diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 04ff4abc1..dd62fb5f1 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -713,8 +713,17 @@ check ovn-nbctl ls-add sw0 check sleep 5 check_row_count Datapath_Binding 0 +# Do not resume both main and backup right after each other +# as there would be no guarentee of which one would become active AS_BOX([Resume the main northd]) check as northd ovs-appctl -t NORTHD_TYPE resume +OVS_WAIT_FOR_OUTPUT([get_northd_status], [0], [false +Status: active +true +Status: paused +]) + +AS_BOX([Resume the backup northd]) check as northd-backup ovs-appctl -t NORTHD_TYPE resume OVS_WAIT_FOR_OUTPUT([get_northd_status], [0], [false Status: active diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at index 9affca498..db0e5272e 100644 --- a/tests/ovn-performance.at +++ b/tests/ovn-performance.at @@ -543,6 +543,10 @@ OVN_CONTROLLER_EXPECT_HIT_COND( [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public hv3] ) +# Wait for port_binding change related flows +hv5_ch=$(ovn-sbctl --bare --columns _uuid list chassis hv5) +OVS_WAIT_UNTIL([ovn-sbctl find port_binding logical_port=cr-lr1-public chassis=$hv5_ch]) +ovn-nbctl --wait=hv sync # Delete hv5 from gateway chassis. There should be no lflow_run. OVN_CONTROLLER_EXPECT_NO_HIT( [hv1 hv2 hv3 hv4 hv5], [lflow_run], diff --git a/tests/ovn.at b/tests/ovn.at index bbad0f194..3b47c8e69 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -105,6 +105,37 @@ m4_divert_text([PREPARE_TESTS], test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c "output:$ofport") ]) } + + ovn_wait_remote_input_flows () { + hv1=$1 + hv2=$2 + echo "$3: waiting for flows for remote input on $hv1" + # Wait for a flow outputing to remote input + OVS_WAIT_UNTIL([ + ofport=$(as $hv1 ovs-vsctl --bare --columns ofport find Interface name=ovn-${hv2}-0) + echo "tunnel port=$ofport" + test 1 -le $(as $hv1 ovs-ofctl dump-flows br-int | grep -c "in_port=$ofport") + ]) + } + + # ovn_wait_for_bfd_up HV + # BFD might be quite slow. While BFD is not up, all chassis will fight to claim the port + # Wait for BFD between different chassis to be up + ovn_wait_for_bfd_up() { + for hv; do + as $hv + for chassis; do + if test $hv != $chassis; then + echo "checking bdf_status for $hv -> $chassis" + OVS_WAIT_UNTIL([ + bfd_status=$(as $hv ovs-vsctl get interface ovn-$chassis-0 bfd_status:state) + echo "bfd status = $bfd_status" + test "$bfd_status" = "up" + ]) + fi + done + done + } ]) m4_define([OVN_CHECK_PACKETS], @@ -9668,7 +9699,7 @@ check ovn-nbctl --wait=hv qos-add lsw0 to-lport 1002 'inport=="lp2" && is_chassi AT_CHECK([as hv ovs-ofctl dump-meters br-int -O OpenFlow13 | grep meter | wc -l], [0], [4 ]) -check ovn-nbctl qos-del lsw0 +check ovn-nbctl --wait=hv qos-del lsw0 AT_CHECK([as hv ovs-ofctl dump-meters br-int -O OpenFlow13 | grep meter | wc -l], [0], [0 ]) @@ -13092,6 +13123,13 @@ grep active_backup | grep slaves:$hv2_gw2_ofport,$hv2_gw1_ofport \ | wc -l], [0], [1 ]) +wait_bfd_enabled() { + interface=$1 + OVS_WAIT_UNTIL([test 1 = `ovs-vsctl --bare --columns bfd find Interface name=$interface | \ +grep "enable=true" | wc -l` +]) +} + # check that the chassis redirect port has been reclaimed by the gw2 chassis wait_row_count Port_Binding 1 logical_port=cr-outside chassis=$gw2_chassis @@ -13099,28 +13137,21 @@ wait_row_count Port_Binding 1 logical_port=cr-outside chassis=$gw2_chassis as gw1 for chassis in gw2 hv1 hv2; do echo "checking gw1 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done - # check BFD enablement on tunnel ports from gw2 ########## as gw2 for chassis in gw1 hv1 hv2; do echo "checking gw2 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # check BFD enablement on tunnel ports from hv1 ########### as hv1 for chassis in gw1 gw2; do echo "checking hv1 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # make sure BFD is not enabled to hv2, we don't need it AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-hv2-0],[0], @@ -13132,9 +13163,7 @@ AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-hv2-0],[0], as hv2 for chassis in gw1 gw2; do echo "checking hv2 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # make sure BFD is not enabled to hv1, we don't need it AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-hv1-0],[0], @@ -13325,27 +13354,21 @@ grep active_backup | grep slaves:$hv2_gw2_ofport,$hv2_gw1_ofport \ as gw1 for chassis in gw2 hv1 hv2; do echo "checking gw1 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # check BFD enablement on tunnel ports from gw2 ########## as gw2 for chassis in gw1 hv1 hv2; do echo "checking gw2 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # check BFD enablement on tunnel ports from hv1 ########### as hv1 for chassis in gw1 gw2; do echo "checking hv1 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # make sure BFD is not enabled to hv2, we don't need it AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-hv2-0],[0], @@ -13356,9 +13379,7 @@ AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-hv2-0],[0], as hv2 for chassis in gw1 gw2; do echo "checking hv2 -> $chassis" - AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-$chassis-0],[0], - [[enable=true -]]) + wait_bfd_enabled ovn-$chassis-0 done # make sure BFD is not enabled to hv1, we don't need it AT_CHECK([ovs-vsctl --bare --columns bfd find Interface name=ovn-hv1-0],[0], @@ -14368,6 +14389,10 @@ wait_column "$hv2_uuid" Port_Binding requested_chassis logical_port=migrator wait_column "" Port_Binding additional_chassis logical_port=migrator wait_column "" Port_Binding requested_additional_chassis logical_port=migrator +# Previous wait_for_ports_up does not guarantee that the flows are already properly installed. +# For instance, migrator port might still be up from prior to complete migration to hv2 +OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"']) + # check that... # unicast from Third doesn't arrive to hv1:Migrator # unicast from Third arrives to hv2:Migrator @@ -16474,21 +16499,25 @@ as hv1 ovs-ofctl dump-flows br-int # Send IP packets between all pairs of source and destination ports, # packets matches ACL1 but not ACL2 should be dropped -for is in 1 2 3; do - for js in 1 2 3; do - for ks in 1 2 3; do - bcast= - s=$is$js$ks - slsp_mac=`lsp_to_mac $s` - slrp_mac=`lrp_to_mac $is$js` - sip=192.168.$is$js.$ks - for id in 1 2 3; do - for jd in 1 2 3; do - for kd in 1 2 3; do - d=$id$jd$kd - dlsp_mac=`lsp_to_mac $d` - dlrp_mac=`lrp_to_mac $id$jd` - dip=192.168.$id$jd.$kd +# We use the destination as the outer loop, so we can check whether we received +# the icmp echo using 3^3 OVN_CHECK_PACKETS. Using source as the outer loop +# would require 3^6 OVN_CHECK_PACKETS, causing the test duration to increase dramatically +# (by more than a minute). +for id in 1 2 3; do + for jd in 1 2 3; do + for kd in 1 2 3; do + d=$id$jd$kd + dlsp_mac=`lsp_to_mac $d` + dlrp_mac=`lrp_to_mac $id$jd` + dip=192.168.$id$jd.$kd + for is in 1 2 3; do + for js in 1 2 3; do + for ks in 1 2 3; do + bcast= + s=$is$js$ks + slsp_mac=`lsp_to_mac $s` + slrp_mac=`lrp_to_mac $is$js` + sip=192.168.$is$js.$ks if test $is = $id; then dmac=$dlsp_mac; else dmac=$slrp_mac; fi if test $d != $s; then unicast=$d; else unicast=; fi @@ -16500,7 +16529,29 @@ for is in 1 2 3; do fi # icmp request (type = 8) test_icmp $s $slsp_mac $dmac $sip $dip 8 $unicast - + done + done + done + # Make sure icmp echo are received before generating replies + OVN_CHECK_PACKETS([hv`vif_to_hv $id$jd$kd`/vif$id$jd$kd-tx.pcap], + [$id$jd$kd.expected]) + + for is in 1 2 3; do + for js in 1 2 3; do + for ks in 1 2 3; do + bcast= + s=$is$js$ks + slsp_mac=`lsp_to_mac $s` + slrp_mac=`lrp_to_mac $is$js` + sip=192.168.$is$js.$ks + if test $is = $id; then dmac=$dlsp_mac; else dmac=$slrp_mac; fi + if test $d != $s; then unicast=$d; else unicast=; fi + # packets matches ACL1 but not ACL2 should be dropped + if test $id != 3 && test $kd = 1; then + if test $is = 1 || test $ks != 2; then + unicast= + fi + fi # if packets are not dropped, test the return traffic (icmp echo) # to make sure stateful works, too. if test x$unicast != x; then @@ -18405,19 +18456,19 @@ arp_request=ffffffffffff${ext1_mac}08060001080006040001${ext1_mac}${ext1_ip}0000 as hv1 ovs-appctl netdev-dummy/receive hv1-ext1 $arp_request expected_response=${src_mac}${router_mac}08060001080006040002${router_mac}${router_ip}${ext1_mac}${ext1_ip} -echo $expected_response > expout -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/ext1-tx.pcap > ext1_arp_resp -AT_CHECK([cat ext1_arp_resp], [0], [expout]) +echo $expected_response > expected_out +OVN_CHECK_PACKETS_CONTAIN([hv1/ext1-tx.pcap], [expected_out]) # Verify that the response came from hv2 -$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv2/br-phys_n1-tx.pcap > ext1_arp_resp -AT_CHECK([cat ext1_arp_resp], [0], [expout]) +OVN_CHECK_PACKETS_CONTAIN([hv2/br-phys_n1-tx.pcap], [expected_out]) # Now add 3 ha chassis to the ha chassis group ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv1 30 ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv2 20 ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv3 10 +ovn_wait_for_bfd_up hv1 hv2 hv3 + # hv1 should be master and claim ls1-lp_ext1 wait_row_count Port_Binding 1 logical_port=ls1-lp_ext1 chassis=$hv1_uuid wait_for_ports_up ls1-lp_ext1 @@ -19452,7 +19503,7 @@ echo $(get_arp_req f00000010204 $fip_ip $gw_router_ip) >> expected send_arp_reply 2 1 $gw_router_mac f00000010204 $gw_router_ip $fip_ip echo "${gw_router_mac}f0000001020408004500001c00004000fe0121b4${fip_ip}${dst_ip}${data}" >> expected -AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=37 | grep pkt_mark=0x64 | grep -q n_packets=1],[0]) +OVS_WAIT_UNTIL([test 1 = `as hv2 ovs-ofctl dump-flows br-int table=37 | grep pkt_mark=0x64 | grep -c n_packets=1`]) OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) @@ -20721,6 +20772,7 @@ packet0="inport==\"sw0-p11\" && eth.src==00:00:00:00:00:11 && eth.dst==00:00:00: ip4 && ip.ttl==64 && ip4.src==192.168.1.11 && ip4.dst==192.168.1.100 && tcp && tcp.src==10000 && tcp.dst==80" as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet0" +ovn-nbctl --wait=hv ovn-sbctl list controller_event > events AT_CAPTURE_FILE([events]) @@ -20749,6 +20801,7 @@ packet1="inport==\"sw1-p0\" && eth.src==00:00:00:00:00:33 && eth.dst==00:00:00:0 tcp && tcp.src==10000 && tcp.dst==80" as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet1" +ovn-nbctl --wait=hv ovn-sbctl list controller_event uuid=$(ovn-sbctl list controller_event | awk '/_uuid/{print $3}') AT_CHECK([ovn-sbctl get controller_event $uuid event_type], [0], [dnl @@ -20764,6 +20817,7 @@ packet2="inport==\"sw0-p11\" && eth.src==00:00:00:00:00:11 && eth.dst==00:00:00: tcp && tcp.src==10000 && tcp.dst==50051" as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet2" +ovn-nbctl --wait=hv ovn-sbctl list controller_event uuid=$(ovn-sbctl list controller_event | awk '/_uuid/{print $3}') @@ -23292,6 +23346,8 @@ ovn-nbctl lrp-set-redirect-type router-to-underlay bridged wait_for_ports_up ovn-nbctl --wait=sb sync +OVN_WAIT_PATCH_PORT_FLOWS(["ln1"] ["ln2"] ["ln3"], ["hv1"] ["hv2"] ["hv3"]) +OVN_WAIT_PATCH_PORT_FLOWS(["ln4"], ["hv4"]) OVN_POPULATE_ARP @@ -28272,7 +28328,7 @@ test_ip 2 f00000000002 f00000000001 $sip $dip 1 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected]) # Delete the ACL1 that has "allow" action -ovn-nbctl acl-del ls1 to-lport 1001 \ +ovn-nbctl --wait=hv acl-del ls1 to-lport 1001 \ 'outport == "lsp1" && ip4 && ip4.src == $as1' # ACL2 should take effect and packet should be dropped @@ -31791,6 +31847,7 @@ AT_CHECK([as hv1 ovs-ofctl -OOpenFlow15 dump-meters br-int | grep -q rate=100], AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep -q meter_id=1], [0]) check ovn-nbctl meter-del meter2 +check ovn-nbctl --wait=hv sync AT_CHECK([as hv1 ovs-ofctl -OOpenFlow15 dump-meters br-int | grep -q rate=100], [1]) OVN_CLEANUP([hv1])