From patchwork Fri Nov 3 13:42:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1858913 X-Patchwork-Delegate: dceara@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=iF8aQtev; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMMQQ5MDvz1yQ5 for ; Sat, 4 Nov 2023 00:43:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 297C08543E; Fri, 3 Nov 2023 13:43:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 297C08543E Authentication-Results: smtp1.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=iF8aQtev 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 Wknew75Z0M0q; Fri, 3 Nov 2023 13:43:16 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id D9DC58540A; Fri, 3 Nov 2023 13:43:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D9DC58540A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6A098C0DDF; Fri, 3 Nov 2023 13:43:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id D7535C0039 for ; Fri, 3 Nov 2023 13:43:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9E57442F11 for ; Fri, 3 Nov 2023 13:43:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9E57442F11 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iF8aQtev 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 MKQcSfmBh-Fb for ; Fri, 3 Nov 2023 13:43:02 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id D2E5E42ECF for ; Fri, 3 Nov 2023 13:43:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D2E5E42ECF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699018980; 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=wPArj/cSy/OpjuiSzl+Fi+kFivovdR6hJX/QtbNMTYM=; b=iF8aQtevzC2t94YQnmB+6E7LER7gkPzDtLM8VwkY7Oimx6Q1/5C0GTHVIVJ4zrI2RQKoM7 MY3KIzldOfuJX6jJVwB1XoiRNdd5K2pw20gT0PvO1Cfjsa/JiHh7ErRIcwCYXZvmtPjhdP jZFQtrDrGIfkiBMO/TQkpZBBZ6t1NOo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-AH47bgMhPIa_jhGCTIfmzw-1; Fri, 03 Nov 2023 09:42:59 -0400 X-MC-Unique: AH47bgMhPIa_jhGCTIfmzw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id C4B6885A59D for ; Fri, 3 Nov 2023 13:42:58 +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 ACAEC1121308; Fri, 3 Nov 2023 13:42:58 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Fri, 3 Nov 2023 14:42:57 +0100 Message-Id: <20231103134257.441166-6-xsimonar@redhat.com> In-Reply-To: <20231103134257.441166-1-xsimonar@redhat.com> References: <20231103134257.441166-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 5/5] tests: fixed race_condition with max_prefix 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 following tests: - ipam - ipam connectivity - ipam to non-ipam set the mac_prefix using nbctl. However, it can happen that both northd and nbctl sets the mac_prefix at the same time, which might result in the mac_prefix from nbctl to be dropped. Signed-off-by: Xavier Simonart --- tests/ovn.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ovn.at b/tests/ovn.at index a855392fc..1f75f8c08 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -8408,6 +8408,7 @@ check_dynamic_addresses() { check_row_count nb:Logical_Switch_Port 1 name="$1" dynamic_addresses="$arg" } +check ovn-nbctl --wait=sb sync # Add a port to a switch that does not have a subnet set, then set the # subnet which should result in an address being allocated for the port. ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" @@ -8723,7 +8724,7 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([ipam connectivity]) ovn_start -ovn-nbctl lr-add R1 +ovn-nbctl --wait=sb lr-add R1 # Test for a ping using dynamically allocated addresses. ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" @@ -21177,6 +21178,7 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([ipam to non-ipam]) ovn_start +check ovn-nbctl --wait=sb sync ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" ovn-nbctl ls-add sw0 ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic