From patchwork Mon Jul 8 11:24:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1957893 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=Hsr3bELQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.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 4WHhbk03j3z1xrP for ; Mon, 8 Jul 2024 21:24:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B2F5B80B59; Mon, 8 Jul 2024 11:24:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 1htdbN3rtfLt; Mon, 8 Jul 2024 11:24:30 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 89E2580D44 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=Hsr3bELQ Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 89E2580D44; Mon, 8 Jul 2024 11:24:30 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 58F44C0A98; Mon, 8 Jul 2024 11:24:30 +0000 (UTC) X-Original-To: ovs-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 5EA3DC0A99 for ; Mon, 8 Jul 2024 11:24:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 44ECE40338 for ; Mon, 8 Jul 2024 11:24:29 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OnUkJEtMLQxA for ; Mon, 8 Jul 2024 11:24:28 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=dceara@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 28FC7400A4 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 28FC7400A4 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=Hsr3bELQ Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 28FC7400A4 for ; Mon, 8 Jul 2024 11:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720437866; 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=7meGwO5LAjAVAJqiHFZUADutsfJwNyo8rvgFPEHM9Lc=; b=Hsr3bELQ/GOiBU3h0kadVZA4gFQSYfjfBFmNPrSwOba4PA2P0crvOOxYNfF6xOyScPpDyL IMCRIETRnrMOdoGiux05FqcK12HAyhOskEn9gIw4B2lKfqFMwzLkZDnGU6RI4axXl+BD6L QLqNefTR+6SHmDFiLSoxzjyLDxpfkvs= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-684-YeLbZHr4OJCXFyI_NJHq4Q-1; Mon, 08 Jul 2024 07:24:25 -0400 X-MC-Unique: YeLbZHr4OJCXFyI_NJHq4Q-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 806151955F45; Mon, 8 Jul 2024 11:24:24 +0000 (UTC) Received: from cecil-rh.redhat.com (unknown [10.39.195.23]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B0BFB195605A; Mon, 8 Jul 2024 11:24:22 +0000 (UTC) From: Dumitru Ceara To: ovs-dev@openvswitch.org Date: Mon, 8 Jul 2024 13:24:07 +0200 Message-ID: <20240708112414.4050943-2-dceara@redhat.com> In-Reply-To: <20240708112414.4050943-1-dceara@redhat.com> References: <20240708112414.4050943-1-dceara@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/8] northd: Assume all chassis support the "port-up-notif" feature. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This feature is supported in the last two LTS releases and the correct upgrade procedure mandates that we don't jump across LTS releases. It's safe to remove the check in northd. Signed-off-by: Dumitru Ceara --- northd/northd.c | 3 +-- tests/ovn-northd.at | 24 ------------------------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index 6898daa00d..1b5a7480e4 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -17903,8 +17903,7 @@ handle_port_binding_changes(struct ovsdb_idl_txn *ovnsb_txn, if (lsp_is_router(op->nbsp)) { up = true; } else if (sb->chassis) { - up = smap_get_bool(&sb->chassis->other_config, - OVN_FEATURE_PORT_UP_NOTIF, false) + up = !smap_get_bool(&sb->chassis->other_config, "is-remote", false) ? sb->n_up && sb->up[0] : true; } diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index a389d19886..7dc94e1f56 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -4168,30 +4168,6 @@ AT_CHECK([grep -qE 'duplicate logical.*port p1' northd/ovn-northd.log], [0]) AT_CLEANUP ]) -OVN_FOR_EACH_NORTHD_NO_HV([ -AT_SETUP([Port_Binding.up backwards compatibility]) -ovn_start - -ovn-nbctl ls-add ls1 -ovn-nbctl --wait=sb lsp-add ls1 lsp1 - -# Simulate the fact that lsp1 had been previously bound on hv1 by an -# ovn-controller running an older version. -ovn-sbctl \ - --id=@e create encap chassis_name=hv1 ip="192.168.0.1" type="geneve" \ - -- --id=@c create chassis name=hv1 encaps=@e \ - -- set Port_Binding lsp1 chassis=@c - -wait_for_ports_up lsp1 - -# Simulate the fact that hv1 is aware of Port_Binding.up, ovn-northd -# should transition the port state to down. -check ovn-sbctl set chassis hv1 other_config:port-up-notif=true -wait_row_count nb:Logical_Switch_Port 1 up=false name=lsp1 - -AT_CLEANUP -]) - OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([ AT_SETUP([Load Balancers and lb_force_snat_ip for Gateway Routers]) ovn_start