From patchwork Tue Jul 18 09:53:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1809134 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::137; helo=smtp4.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=gc5vrDMm; dkim-atps=neutral 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R4vRH5qTQz20Cs for ; Tue, 18 Jul 2023 19:53:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9BA0C416BE; Tue, 18 Jul 2023 09:53:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9BA0C416BE Authentication-Results: smtp4.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=gc5vrDMm 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 uz9lIECMKaJn; Tue, 18 Jul 2023 09:53:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id ACE154169E; Tue, 18 Jul 2023 09:53:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org ACE154169E Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D5796C0071; Tue, 18 Jul 2023 09:53:38 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 542D4C0032 for ; Tue, 18 Jul 2023 09:53:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2A71A402D7 for ; Tue, 18 Jul 2023 09:53:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2A71A402D7 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 XwgLGUChM6pO for ; Tue, 18 Jul 2023 09:53:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3F3C1402E1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3F3C1402E1 for ; Tue, 18 Jul 2023 09:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689674013; 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=C/dGm4TtE577ecGkdf4gDJ/fDCyHc9gEfW6Co5AkoMo=; b=gc5vrDMmzyOk09r+hQnUZYpk7vEA3srGpOAZq7tcyGCkIsNQs1skdoCgHeyX8TgUZu6ngH d2NIw6CKeqbxiYxke6HCGIhEZ9wTkqCHbSxsspba/hDz67OdIeytaJKP6GEEQE1vnkdFOd fZM9SDnSIOvAKIC0tPX6LIf4Ep3jM+Q= 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-668-mWtJ6i7hPueO8BxARyrOHg-1; Tue, 18 Jul 2023 05:53:32 -0400 X-MC-Unique: mWtJ6i7hPueO8BxARyrOHg-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 29B7989F700 for ; Tue, 18 Jul 2023 09:53:32 +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 118FE1454142; Tue, 18 Jul 2023 09:53:32 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Tue, 18 Jul 2023 11:53:30 +0200 Message-Id: <20230718095331.2443200-3-xsimonar@redhat.com> In-Reply-To: <20230718095331.2443200-1-xsimonar@redhat.com> References: <20230718095331.2443200-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 2/3] ovn-controller: avoid monitoring wrong 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" To register a chassis to ovn-sb, ovn-controller create a "name-uuid" for the chassis, which it will send to ovn-sb. In return, ovn-sb creates the uuid based on that "name". Using this "name-uuid" as a uuid in a monitor request to ovn-sb results in monitoring a non-existing chassis. The system returns on track as soon as ovn-controller receives the chassis update from ovn-sb, as it will then send a new monitor request to ovn-sb, with the proper chassis uuid. However, if some ports were already in ovn-sb when it receives the monitor request with the wrong uuid, ovn-sb will notify ovn-controller to delete all those ports. This cause the following sequence in ovn-controller - notification of a new port - deletion of that port - notification of a new port We now prevent sending wrong uuid to ovn-sb. This issue was causing test "testing load-balancer template IPv6" to fail in a flaky way, due to the following warning: if_status|WARN|Trying to release unknown interface vm2 Signed-off-by: Xavier Simonart Acked-by: Ales Musil --- controller/chassis.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controller/chassis.c b/controller/chassis.c index ce88541ba..d3c944973 100644 --- a/controller/chassis.c +++ b/controller/chassis.c @@ -831,7 +831,11 @@ chassis_run(struct ovsdb_idl_txn *ovnsb_idl_txn, } ovs_chassis_cfg_destroy(&ovs_cfg); - return chassis_rec; + if (existed) { + return chassis_rec; + } else { + return NULL; + } } bool