From patchwork Tue Sep 28 15:53:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1533973 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" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=s9WUzUBf; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HJkZG1PRcz9sW8 for ; Wed, 29 Sep 2021 01:53:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C3D4C607A5; Tue, 28 Sep 2021 15:53:37 +0000 (UTC) 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 sznNL4Z_BfsM; Tue, 28 Sep 2021 15:53:37 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 180B960777; Tue, 28 Sep 2021 15:53:36 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C1A38C000F; Tue, 28 Sep 2021 15:53:35 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 07ABFC000D for ; Tue, 28 Sep 2021 15:53:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D5F5160777 for ; Tue, 28 Sep 2021 15:53:33 +0000 (UTC) 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 Zpphr3PG8i1G for ; Tue, 28 Sep 2021 15:53:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by smtp3.osuosl.org (Postfix) with ESMTPS id 2E20660745 for ; Tue, 28 Sep 2021 15:53:33 +0000 (UTC) Received: from frode-threadripper.. (ti0189a330-1161.bb.online.no [88.88.219.141]) (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 smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 7E56241997; Tue, 28 Sep 2021 15:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632844410; bh=3KGbHByI+nRlbdHO61jdYdI7hIjwRUaEKI554OxW2tU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s9WUzUBf83M3kbu13KkxGBZ/UjxVj/GPE1cqCqnh9Go4/z6YEknniKOu4Utm9BnvU eenzyU7V+c8oeRt2N6y4AfYUT+Mz3/caM8zGK3g2T3+sqnWITcJc76yl4Lhtt2M09f tGW0LRO1IEPcLE3P3FDba0+kRoH9um6f/bXze1uJjRJ+ivjcuflZ0vx4LT/3obv1+i LGFJnpR5OR9r7Tf/FyGmmJuQ/NW3DV8BTS4e9+xOt8YON6AcRPiWPdaBwf2a1Xh5jm FrPEyc8akLkixH6S5ZjQZXP00rSkrEWV4+9Hx5pCfQe1eOgBDD3ujnYjpWIkatQLxR ucbli2yxxGkuA== From: Frode Nordahl To: dev@openvswitch.org Date: Tue, 28 Sep 2021 17:53:15 +0200 Message-Id: <20210928155325.2290444-3-frode.nordahl@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210928155325.2290444-1-frode.nordahl@canonical.com> References: <20210928155325.2290444-1-frode.nordahl@canonical.com> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn v6 02/12] test: Fix options:requested-chassis with hostname 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" This test currently passes, but is broken in two ways. 1) The `fetch_column` helper should be used to retrieve the value of hostname, not `fetch` wich results in a "fetch: command not found" error which is currently not caught by the test. As a consequence the requested-chassis option was set to the empty string ("") and not the chassis hostname. 2) When we introduced testing with TLS+RBAC in c948d6bb05b4 the ovn_az_attach helper was updated to set the hostname to match system-id. This of course also makes the name and hostname columns in the Chassis record contain the same value which made this test no longer do what it says on the tin. Update test to explicitly set the value to be used for requested-chassis option in the Chassis hostname record, and add a check for it not being empty nor equal to chassis name. Fixes: 4afe409e95c7 ("tests: Introduce new testing helpers.") Fixes: c948d6bb05b4 ("tests: Test with SSL and RBAC for controller by default") Signed-off-by: Frode Nordahl --- tests/ovn.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ovn.at b/tests/ovn.at index 172b5c713..13e97cfd2 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -13471,13 +13471,15 @@ ovn-nbctl lsp-add ls0 lsp0 net_add n1 sim_add hv1 as hv1 +ovs-vsctl set Open_vSwitch . external-ids:hostname=hv1-hostname ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.11 ovs-vsctl -- add-port br-int hv1-vif0 -- set Interface hv1-vif0 ofport-request=1 wait_row_count Chassis 1 name=hv1 -hv1_hostname=$(fetch Chassis hostname name=hv1) +hv1_hostname=$(fetch_column Chassis hostname name=hv1) echo "hv1_hostname=${hv1_hostname}" +AT_CHECK([test -n "${hv1_hostname}" -a "${hv1_hostname}" != hv1], [1], []) check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=${hv1_hostname} as hv1 ovs-vsctl set interface hv1-vif0 external-ids:iface-id=lsp0