From patchwork Fri Jun 11 06:24:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1490775 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G1W735f9vz9sWk for ; Fri, 11 Jun 2021 16:25:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 09B844149E; Fri, 11 Jun 2021 06:25:32 +0000 (UTC) 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 pM4CvKbClobg; Fri, 11 Jun 2021 06:25:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id A0AD640649; Fri, 11 Jun 2021 06:25:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9160AC0027; Fri, 11 Jun 2021 06:25:27 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 26225C000B for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1552583B62 for ; Fri, 11 Jun 2021 06:25:25 +0000 (UTC) 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 9Jza3k6v-P5g for ; Fri, 11 Jun 2021 06:25:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp1.osuosl.org (Postfix) with ESMTPS id BB2C98249B for ; Fri, 11 Jun 2021 06:25:23 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 530BC240006; Fri, 11 Jun 2021 06:25:18 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Thu, 10 Jun 2021 23:24:49 -0700 Message-Id: <20210611062452.362848-1-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 1/4] ovn-northd.at: Fix test "northd ssl file change -- ovn-northd-ddlog". 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 fails for ovn-northd-ddlog because of the RBAC role when using the SSL connection. RBAC is not the purpose of the test case, so this patch fixes it without enabling RBAC. Signed-off-by: Han Zhou Acked-by: Mark Michelson --- tests/ovn-northd.at | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 4692775ad..ad1732da3 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -3618,9 +3618,23 @@ ovn_start --backup-northd=none as northd OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE]) +as ovn-sb +OVS_APP_EXIT_AND_WAIT([ovsdb-server]) + +key_server=testpki-test-privkey.pem +cert_server=testpki-test-cert.pem +cacert=testpki-cacert.pem + +cd ovn-sb +rm ovsdb-server.log +ssl_options="--remote=pssl:0:127.0.0.1 ovn-sb.db -p $PKIDIR/$key_server -c $PKIDIR/$cert_server -C $PKIDIR/$cacert" +AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file $ssl_options], [0], [], [stderr]) +on_exit "kill `cat ovsdb-server.pid`" +PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT]) +cd .. + key=testpki-hv1-privkey.pem cert=testpki-hv1-cert.pem -cacert=testpki-cacert.pem key2=testpki-hv2-privkey.pem cert3=testpki-hv3-cert.pem @@ -3629,8 +3643,9 @@ cert3=testpki-hv3-cert.pem cp $PKIDIR/$key2 $key cp $PKIDIR/$cert3 $cert cp $PKIDIR/$cacert $cacert +as northd start_daemon ovn$NORTHD_TYPE -vjsonrpc \ - --ovnnb-db=$OVN_NB_DB --ovnsb-db=$SSL_OVN_SB_DB \ + --ovnnb-db=$OVN_NB_DB --ovnsb-db=ssl:127.0.0.1:$TCP_PORT \ -p $key -c $cert -C $cacert # SSL should not connect because of key and cert mismatch