From patchwork Wed Dec 16 08:10:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1416937 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=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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=Ook2Z+YS; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CwnrW0GGNz9sRf for ; Wed, 16 Dec 2020 19:11:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D24E586B19; Wed, 16 Dec 2020 08:11:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tcf8VGgdGjxo; Wed, 16 Dec 2020 08:11:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id CC29086A7A; Wed, 16 Dec 2020 08:11:01 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B187CC0893; Wed, 16 Dec 2020 08:11:01 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id F07D2C0893 for ; Wed, 16 Dec 2020 08:11:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D24B5214F6 for ; Wed, 16 Dec 2020 08:11:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HRfCVLo6JECe for ; Wed, 16 Dec 2020 08:10:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by silver.osuosl.org (Postfix) with ESMTPS id 82CB21FFFE for ; Wed, 16 Dec 2020 08:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608106258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k2+2PYaapTTxs4Xo50NsGjxt0QSTl+5jbdo2cqn0C/4=; b=Ook2Z+YSNZmOisu57WTaZPhMt14YOh2Z/t0H1EEbKRx0DtA9TIQsSu5UkHKRLqh6zfBIKz wp9uvgFesDRFAHLb9hP78jNOP4BrgChktE+oXpxbKe0v2+EGKMa+u1QnY3AZRMuCf2fKD8 PbsPDdvyZ8Bw6/pwAkdFUUi+ptg1stM= 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-445-36AL12eRMoeueb248az8EA-1; Wed, 16 Dec 2020 03:10:56 -0500 X-MC-Unique: 36AL12eRMoeueb248az8EA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD791800D62; Wed, 16 Dec 2020 08:10:55 +0000 (UTC) Received: from dceara.remote.csb (ovpn-114-76.ams2.redhat.com [10.36.114.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92B225D6D3; Wed, 16 Dec 2020 08:10:51 +0000 (UTC) From: Dumitru Ceara To: dev@openvswitch.org Date: Wed, 16 Dec 2020 09:10:47 +0100 Message-Id: <20201216081044.1915.87928.stgit@dceara.remote.csb> In-Reply-To: <20201216081007.1915.61192.stgit@dceara.remote.csb> References: <20201216081007.1915.61192.stgit@dceara.remote.csb> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dceara@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH ovn 1/2] tests: Make "ovn -- ovn-controller incremental processing" more reliable. 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" Relax the full recompute checks as changes to tunnel interfaces, e.g. due to BFD state changes, are not processed incrementally and cause full recomputes. On slower systems (like in CI) this can happen more often. Signed-off-by: Dumitru Ceara --- tests/ovn-performance.at | 111 ++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at index 6cc5b21..e510c6c 100644 --- a/tests/ovn-performance.at +++ b/tests/ovn-performance.at @@ -232,37 +232,32 @@ AT_SETUP([ovn -- ovn-controller incremental processing]) ovn_start net_add n1 -for i in 1 2; do +for i in `seq 1 5`; do sim_add hv$i as hv$i ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.$i -done - -for i in 1 2 3; do - sim_add gw$i - as gw$i - ovs-vsctl add-br br-phys - ovs-vsctl add-br br-ex - ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex" - j=$((i + 2)) - ovn_attach n1 br-phys 192.168.0.$j - ip link add vgw$i type dummy - ovs-vsctl add-port br-ex vgw$i + if [[ $i -ge 3 ]] ; then + ovs-vsctl add-br br-ex + ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex" + ip link add vgw$i type dummy + ovs-vsctl add-port br-ex vgw$i + fi done # Wait for the tunnel ports to be created and up. # Otherwise this may affect the lflow_run count. +for i in `seq 1 5`; do + for j in `seq 1 5`; do + if [[ $i -ne $j ]] ; then + OVS_WAIT_UNTIL([ + test $(as hv$i ovs-vsctl list interface ovn-hv$j-0 | \ + grep -c tunnel_egress_iface_carrier=up) -eq 1 + ]) + fi + done +done -OVS_WAIT_UNTIL([ - test $(as hv1 ovs-vsctl list interface ovn-hv2-0 | \ -grep tunnel_egress_iface_carrier=up | wc -l) -eq 1 -]) - -OVS_WAIT_UNTIL([ - test $(as hv2 ovs-vsctl list interface ovn-hv1-0 | \ -grep tunnel_egress_iface_carrier=up | wc -l) -eq 1 -]) # Add router lr1 OVN_CONTROLLER_EXPECT_NO_HIT( @@ -463,63 +458,63 @@ OVN_CONTROLLER_EXPECT_NO_HIT( ) OVN_CONTROLLER_EXPECT_HIT_COND( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 >0 =0 =0], - [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw1 30 && ovn-nbctl --wait=hv sync] + [hv1 hv2 hv3 hv4 hv5], [lflow_run], [=0 =0 >0 =0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public hv3 30 && ovn-nbctl --wait=hv sync] ) -# After this, BFD should be enabled from hv1 and hv2 to gw1. -# So there should be lflow_run hits in hv1, hv2, gw1 and gw2 +# After this, BFD should be enabled from hv1 and hv2 to hv3. +# So there should be lflow_run hits in hv1, hv2, hv3 and hv4 OVN_CONTROLLER_EXPECT_HIT_COND( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 >0 =0], - [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 20 && ovn-nbctl --wait=hv sync] -) - -OVN_CONTROLLER_EXPECT_HIT( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], - [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw3 10 && ovn-nbctl --wait=hv sync] -) - -# create QoS rule -OVN_CONTROLLER_EXPECT_NO_HIT( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], - [ovn-nbctl --wait=hv set Logical_Switch_Port ln-public options:qos_burst=1000] + [hv1 hv2 hv3 hv4 hv5], [lflow_run], [>0 >0 >0 >0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public hv4 20 && ovn-nbctl --wait=hv sync] ) OVN_CONTROLLER_EXPECT_HIT( - [gw1], [lflow_run], - [as gw1 ovs-vsctl set interface vgw1 external-ids:ovn-egress-iface=true] + [hv1 hv2 hv3 hv4 hv5], [lflow_run], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public hv5 10 && ovn-nbctl --wait=hv sync] ) -# Make gw2 master. There is remote possibility that full recompute -# triggers for gw2 after it becomes master. Most of the time -# there will be no recompute. -ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 40 -gw2_ch=$(ovn-sbctl --bare --columns _uuid list chassis gw2) -OVS_WAIT_UNTIL([ovn-sbctl find port_binding logical_port=cr-lr1-public chassis=$gw2_ch]) +# Make hv4 master. There is remote possibility that full recompute +# triggers for hv1-hv5 after hv4 becomes master because of updates to the +# ovn-hv$i-0 interfaces. Most of the time there will be no recompute. +ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public hv4 40 +hv4_ch=$(ovn-sbctl --bare --columns _uuid list chassis hv4) +OVS_WAIT_UNTIL([ovn-sbctl find port_binding logical_port=cr-lr1-public chassis=$hv4_ch]) OVN_CONTROLLER_EXPECT_HIT_COND( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 =0 >=0 =0], + [hv1 hv2 hv3 hv4 hv5], [lflow_run], [>=0 >=0 >=0 >=0 >=0], [ovn-nbctl --wait=hv sync] ) -# Delete gw2 from gateway chassis +# Delete hv4 from gateway chassis OVN_CONTROLLER_EXPECT_HIT( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], - [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw2 && ovn-nbctl --wait=hv sync] + [hv1 hv2 hv3 hv4 hv5], [lflow_run], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public hv4 && ovn-nbctl --wait=hv sync] ) -# Delete gw1 from gateway chassis -# After this, the BFD should be disabled entirely as gw3 is the +# Delete hv3 from gateway chassis +# After this, the BFD should be disabled entirely as hv5 is the # only gateway chassis. OVN_CONTROLLER_EXPECT_HIT_COND( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 =0 >0], - [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw1] + [hv1 hv2 hv3 hv4 hv5], [lflow_run], [>0 >0 >0 =0 >0], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public hv3] ) -# Delete gw3 from gateway chassis. There should be no lflow_run. +# Delete hv5 from gateway chassis. There should be no lflow_run. OVN_CONTROLLER_EXPECT_NO_HIT( - [hv1 hv2 gw1 gw2 gw3], [lflow_run], - [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw3] + [hv1 hv2 hv3 hv4 hv5], [lflow_run], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public hv5] +) + +# create QoS rule +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2 hv3 hv4 hv5], [lflow_run], + [ovn-nbctl --wait=hv set Logical_Switch_Port ln-public options:qos_burst=1000] +) + +OVN_CONTROLLER_EXPECT_HIT( + [hv3], [lflow_run], + [as hv3 ovs-vsctl set interface vgw3 external-ids:ovn-egress-iface=true] ) for i in 1 2; do