From patchwork Wed Mar 30 11:26:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1611100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=Jw2Sy++a; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KT3zp3yM5z9sDX for ; Wed, 30 Mar 2022 22:26:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B54F141799; Wed, 30 Mar 2022 11:26:40 +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 OtVTeBBS9GK9; Wed, 30 Mar 2022 11:26:39 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3692A402E7; Wed, 30 Mar 2022 11:26:38 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 14835C001D; Wed, 30 Mar 2022 11:26:38 +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 0935FC0012 for ; Wed, 30 Mar 2022 11:26:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E9B618479E for ; Wed, 30 Mar 2022 11:26:36 +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 5xIZTehmxuXl for ; Wed, 30 Mar 2022 11:26:36 +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.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0EB958479D for ; Wed, 30 Mar 2022 11:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648639594; 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=G2B5dSnjWpNT9NHh1arLbu8qxPSQxFBG4U0f9o2yWgI=; b=Jw2Sy++af8ge73B/fot/P5vp3TtOn7oML/gC3bacXJlWegysThXgm4spaCZbBxQh1jZpRa NDtr4IY/UC6g4MmDMfM2WOqIqkV8g+srlkb0c/6EdGlCuJ8ZWPtNalbqZmLIvYJ4fkB5Q9 iZxQe34vmQOwgvlLdvcIRa5Hy3BQIFU= 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-301-PhSrUeoNO16u7927Zhk-2g-1; Wed, 30 Mar 2022 07:26:17 -0400 X-MC-Unique: PhSrUeoNO16u7927Zhk-2g-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 4080991BD8E for ; Wed, 30 Mar 2022 11:26:17 +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 267E940CF8E4; Wed, 30 Mar 2022 11:26:17 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Wed, 30 Mar 2022 07:26:17 -0400 Message-Id: <20220330112617.3986638-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=xsimonar@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] Fixed multiple other flaky tests 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" - options:requested-chassis for logical port - NAT and Load Balancer flows - 2LSs IGMP and MLD - Dynamic neighbor between LRs - (userspace test) conntrack TCP reset - Dont flood fill local datapaths beyond distributed gateway port - 1 LR with distributed router gateway port Signed-off-by: Xavier Simonart Acked-by: Mark Michelson --- tests/ovn-northd.at | 2 +- tests/ovn.at | 17 ++++++++++++----- tests/system-ovn.at | 9 +++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index d9de4aacb..c252f61a5 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -4566,7 +4566,7 @@ check ovn-nbctl lr-nat-del ro1 check ovn-nbctl lr-nat-del ro2 check ovn-nbctl --add-route lr-nat-add ro1 dnat_and_snat 10.0.0.100 192.168.1.2 vm1 00:00:00:00:00:01 -check ovn-nbctl --add-route lr-nat-add ro2 dnat_and_snat 20.0.0.100 192.168.2.2 vm2 00:00:00:00:00:02 +check ovn-nbctl --wait=sb --add-route lr-nat-add ro2 dnat_and_snat 20.0.0.100 192.168.2.2 vm2 00:00:00:00:00:02 check_lflows 1 diff --git a/tests/ovn.at b/tests/ovn.at index 0c2fe9f97..2d13a1cb2 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -76,6 +76,12 @@ m4_define([OVN_CHECK_PACKETS_REMOVE_BROADCAST], m4_define([OVN_CHECK_PACKETS_CONTAIN], [ovn_wait_packets__ "$1" "$2" "__file__:__line__"]) +# OVN_CHECK_PACKETS_UNIQ succeeds if some expected packets are duplicated. +# It fails if unexpected packets are received. +m4_define([OVN_CHECK_PACKETS_UNIQ], + [ovn_check_packets__ "$1" "$2" "__file__:__line__" + AT_CHECK([sort $rcv_text | uniq], [0], [expout])]) + AT_BANNER([OVN components]) AT_SETUP([lexer]) @@ -11418,7 +11424,7 @@ echo $outside_ip test_arp 3 1 f00000010204 $outside_ip $rtr_ip # Now check the packets actually received against the ones expected. -OVN_CHECK_PACKETS([hv3/vif1-tx.pcap], [hv3-vif1.expected]) +OVN_CHECK_PACKETS_UNIQ([hv3/vif1-tx.pcap], [hv3-vif1.expected]) # Send ip packet between foo1 and outside1 src_mac="f00000010203" @@ -11428,7 +11434,7 @@ dst_ip=`ip_to_hex 172 16 1 3` packet=${dst_mac}${src_mac}08004500001c0000000040110000${src_ip}${dst_ip}0035111100080000 # Now check the packets actually received against the ones expected. -OVN_CHECK_PACKETS([hv3/vif1-tx.pcap], [hv3-vif1.expected]) +OVN_CHECK_PACKETS_UNIQ([hv3/vif1-tx.pcap], [hv3-vif1.expected]) # Now add bridge-mappings on hv2, which should make everything work as hv2 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys @@ -11449,7 +11455,7 @@ exp_gw_ip_garp=ffffffffffff00000201020308060001080006040001000002010203ac1001010 echo $exp_gw_ip_garp >> hv3-vif1.expected # Now check the packets actually received against the ones expected. -OVN_CHECK_PACKETS([hv3/vif1-tx.pcap], [hv3-vif1.expected]) +OVN_CHECK_PACKETS_UNIQ([hv3/vif1-tx.pcap], [hv3-vif1.expected]) # Send ip packet between foo1 and outside1 src_mac="f00000010203" @@ -13838,7 +13844,7 @@ as hv1 ovs-vsctl set interface hv1-vif0 external-ids:iface-id=lsp0 OVS_WAIT_UNTIL([test 1 = $(grep -c "Claiming lport lsp0" hv1/ovn-controller.log)]) -check_column "$hv1_uuid" Port_Binding chassis logical_port=lsp0 +wait_column "$hv1_uuid" Port_Binding chassis logical_port=lsp0 # (4) Chassis hv1 should add flows in OFTABLE_PHY_TO_LOG and OFTABLE_LOG_TO_PHY tables. as hv1 ovs-ofctl dump-flows br-int @@ -25636,7 +25642,6 @@ src_ip=`ip_to_hex 10 0 1 2` dst_ip=`ip_to_hex 10 0 2 2` packet=${dst_mac}${src_mac}08004500001c0000000040110000${src_ip}${dst_ip}0035111100080000 as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet -as hv1 ovs-appctl ofproto/trace br-int in_port=1 $packet # Packet to Expect at p2 src_mac="000000000201" @@ -25646,6 +25651,7 @@ dst_ip=`ip_to_hex 10 0 2 2` echo "${dst_mac}${src_mac}08004500001c000000003e110200${src_ip}${dst_ip}0035111100080000" > expected OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) +as hv1 ovs-appctl ofproto/trace br-int in_port=1 $packet # MAC binding entry should have generated AT_CHECK([ovn-sbctl find mac ip=10.0.0.2 mac='"00:00:00:00:03:02"' logical_port=lrp-r1-join | grep 10\.0\.0\.2], [0], [ignore], []) @@ -29553,6 +29559,7 @@ AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=26 | grep 10.0.1.2], [0], [ig # doesn't remove.) check ovn-nbctl --wait=hv lrp-set-gateway-chassis lrp_lr_ls1 hv1 1 as hv2 check ovn-appctl -t ovn-controller recompute +ovn-nbctl --wait=hv sync AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=26 | grep 10.0.1.2], [1]) # Enable dnat_and_snat on lr, and now hv2 should see flows for lsp1. diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 5d90be1c9..2de21e9f5 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -4174,13 +4174,17 @@ start_daemon ovn-controller # - subnet 20.0.0.0/8 # - 2 port (sw2-p1 - sw2-p2) # - IGMP Querier from 20.0.0.254 - ovn-nbctl ls-add sw1 ovn-nbctl ls-add sw2 for i in `seq 1 2` do ADD_NAMESPACES(sw1-p$i) +# Only send 1 membership report as second one might be received after flushing IGMP groups +# causing test to fail + NS_CHECK_EXEC([sw1-p$i], [sysctl -w net.ipv4.igmp_qrv=1], [0], [dnl +net.ipv4.igmp_qrv = 1 +]) ADD_VETH(sw1-p$i, sw1-p$i, br-int, "10.0.0.$i/24", "00:00:00:00:01:0$i", \ "10.0.0.254") ovn-nbctl lsp-add sw1 sw1-p$i \ @@ -4200,6 +4204,7 @@ done ovn-nbctl set Logical_Switch sw1 other_config:mcast_querier="false" ovn-nbctl set Logical_Switch sw1 other_config:mcast_snoop="true" + group_v4="239.0.1.68" # Inject IGMP Join for v4 group on sw1-p1. NS_CHECK_EXEC([sw1-p1], [ip addr add dev sw1-p1 ${group_v4}/32 autojoin], [0]) @@ -5414,7 +5419,7 @@ AT_CHECK([ ct_est_count=$(ovs-appctl dpctl/dump-conntrack | grep 10.0.0.10 | grep state=ESTABLISHED -c) test $ct_est_count -eq 0 - ct_est_count=$(ovs-appctl dpctl/dump-conntrack | grep 10.0.0.10 | grep state=CLOS -c) + ct_est_count=$(ovs-appctl dpctl/dump-conntrack | grep 10.0.0.10 | grep state='CLOS\|TIME_WAIT' -c) test $ct_est_count -eq 1 ])