From patchwork Wed Jun 22 16:21:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1646638 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=Z+vzqUPm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LSpY21PzVz9s2R for ; Thu, 23 Jun 2022 02:21:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8CE52404DB; Wed, 22 Jun 2022 16:21:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8CE52404DB Authentication-Results: smtp2.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=Z+vzqUPm X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BhlR--Js3qRI; Wed, 22 Jun 2022 16:21:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id A192C40012; Wed, 22 Jun 2022 16:21:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A192C40012 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 712A3C0039; Wed, 22 Jun 2022 16:21:20 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2B547C002D for ; Wed, 22 Jun 2022 16:21:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0564D6077D for ; Wed, 22 Jun 2022 16:21:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0564D6077D Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z+vzqUPm 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 Zj_hovVjN5Nh for ; Wed, 22 Jun 2022 16:21:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 81F59605B0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 81F59605B0 for ; Wed, 22 Jun 2022 16:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655914876; 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=grbbh6GtdoN9L73aI7Hplhj2rgSr+Q7jz5r7LuxgPY0=; b=Z+vzqUPmqPkRM8xBVow4d9SzURbPdEYbnp82Jox3Kl0yAdV6DSpEZQxJnpINJaa43bMRfC /2yEp3HSX5+OMXpTtTNm6J42EJkCMxL6lKg78Qmz1BhMA4bBrRYkxtyGEGdNJ4fnlpVo9w Fts3j9EGpFi2CVVl/tJHdIbYJ/1+Vwc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-331-XFnx_KiGOsCDeGY5GAHfxQ-1; Wed, 22 Jun 2022 12:21:15 -0400 X-MC-Unique: XFnx_KiGOsCDeGY5GAHfxQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C97811C06EC7 for ; Wed, 22 Jun 2022 16:21:14 +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 B17BF141510C; Wed, 22 Jun 2022 16:21:14 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Wed, 22 Jun 2022 12:21:13 -0400 Message-Id: <20220622162113.1509569-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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] tests: fixed flaky test localnet connectivity with multiple requested-chassis 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" The test was failing randomly (on highly loaded systems) mainly because the MAC address of the migrator port in the main switch was migrating at unexpected times. In addition, a few undefined variables were fixed, and sleep was removed / replaced by ovs_wait actions. Signed-off-by: Xavier Simonart Acked-by: Dumitru Ceara Acked-by: Ihar Hrachyshka --- tests/ovn.at | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index bfaa41962..12d1f8667 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -14691,10 +14691,10 @@ wait_column "" Port_Binding requested_additional_chassis logical_port=migrator wait_for_ports_up # advertise location of ports through localnet port -send_garp hv1 migrator 0000000000ff ffffffffffff $migrator_spa $migrator_tpa -send_garp hv1 first 000000000001 ffffffffffff $first_spa $first_tpa -send_garp hv2 second 000000000002 ffffffffffff $second_spa $second_tpa -send_garp hv3 third 000000000003 ffffffffffff $third_spa $third_tpa +send_garp hv1 migrator 0000000000ff ffffffffffff $migrator_tpa $migrator_tpa +send_garp hv1 first 000000000001 ffffffffffff $first_spa $first_spa +send_garp hv2 second 000000000002 ffffffffffff $second_spa $second_spa +send_garp hv3 third 000000000003 ffffffffffff $third_spa $third_spa reset_env # check that... @@ -14840,6 +14840,12 @@ echo $request >> hv3/third.expected check_packets +# Wait for MAC address of migrator to be on hv1 related port in main switch. +# Hence the MAC will not migrate back unexpectedly later. +p1=$(as main ovs-ofctl show n1 | grep hv1_br-phys | awk '{print int($1)}') +p2=$(as main ovs-ofctl show n1 | grep hv2_br-phys | awk '{print int($1)}') +OVS_WAIT_UNTIL([test x`as main ovs-appctl fdb/show n1 | grep 00:00:00:00:00:ff | awk '{print $1}'` = x$p1]) + # Complete migration: destination is bound check ovn-nbctl lsp-set-options migrator requested-chassis=hv2 wait_column "$hv2_uuid" Port_Binding chassis logical_port=migrator @@ -14849,12 +14855,16 @@ wait_column "" Port_Binding requested_additional_chassis logical_port=migrator wait_for_ports_up check ovn-nbctl --wait=hv sync -sleep 1 +OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"']) # advertise new location of the port through localnet port -send_garp hv2 migrator 0000000000ff ffffffffffff $migrator_spa $migrator_tpa +send_garp hv2 migrator 0000000000ff ffffffffffff $migrator_tpa $migrator_tpa + reset_env +# Wait for MAC address of migrator to be on hv2 port in main switch +OVS_WAIT_UNTIL([test x`as main ovs-appctl fdb/show n1 | grep 00:00:00:00:00:ff | awk '{print $1}'` = x$p2]) + # check that... # unicast from Third doesn't arrive to hv1:Migrator # unicast from Third arrives to hv2:Migrator