From patchwork Mon Jul 2 01:23:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 937635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41JqJK16XFz9s4Z for ; Mon, 2 Jul 2018 11:23:11 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 36289BB3; Mon, 2 Jul 2018 01:23:08 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D6D9B49B for ; Mon, 2 Jul 2018 01:23:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 26E60E2 for ; Mon, 2 Jul 2018 01:23:05 +0000 (UTC) X-Originating-IP: 76.21.1.228 Received: from localhost.localdomain (unknown [76.21.1.228]) (Authenticated sender: jpettit@ovn.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 4359E20002 for ; Mon, 2 Jul 2018 01:23:10 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Sun, 1 Jul 2018 18:23:00 -0700 Message-Id: <20180702012301.36193-1-jpettit@ovn.org> X-Mailer: git-send-email 2.17.1 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 1/2] ovs-sandbox: Use different log file names for ovn-controllers. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Commit 047458de40391 ("ovs-sandbox: Add option to support multiple ovn-controllers.") allowed creating multiple instances of ovn-controller. However, all instances would use the same log file name. This commit uses the sequence number to name the log file. Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- tutorial/ovs-sandbox | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox index 781bedbc6e35..3fab1c0ccc98 100755 --- a/tutorial/ovs-sandbox +++ b/tutorial/ovs-sandbox @@ -537,7 +537,8 @@ if $ovn; then for i in $(seq $n_controllers); do rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \ $OVN_CTRLR_PKI --detach --no-chdir -vsyslog:off \ - --pidfile=ovn-controller$i.pid -vconsole:off --log-file + --log-file=ovn-controller$i.log \ + --pidfile=ovn-controller$i.pid -vconsole:off done rungdb $gdb_ovn_controller_vtep $gdb_ovn_controller_vtep_ex \ ovn-controller-vtep --detach --no-chdir --pidfile -vconsole:off \ From patchwork Mon Jul 2 01:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 937636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41JqJn4Js8z9s4Z for ; Mon, 2 Jul 2018 11:23:37 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id EE788BCF; Mon, 2 Jul 2018 01:23:08 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0629249B for ; Mon, 2 Jul 2018 01:23:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6B1D1674 for ; Mon, 2 Jul 2018 01:23:06 +0000 (UTC) X-Originating-IP: 76.21.1.228 Received: from localhost.localdomain (unknown [76.21.1.228]) (Authenticated sender: jpettit@ovn.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 4BAE220003 for ; Mon, 2 Jul 2018 01:23:11 +0000 (UTC) From: Justin Pettit To: dev@openvswitch.org Date: Sun, 1 Jul 2018 18:23:01 -0700 Message-Id: <20180702012301.36193-2-jpettit@ovn.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180702012301.36193-1-jpettit@ovn.org> References: <20180702012301.36193-1-jpettit@ovn.org> X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 2/2] ovs-sandbox: Fix ovs-appctl for ovn-northd and ovn-controller. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Commits 1e8eeb66db2e7 ("ovs-sandbox: Support starting multiple ovn-northds.") and 047458de40391 ("ovs-sandbox: Add option to support multiple ovn-controllers.") allowed starting multiple instances of ovn-northd and ovn-controller, respectively. It did this by assigning a sequence number to to the pidfile name. Unfortunately, this breaks the method ovs-appctl uses to determine to which process it should connect. This commit changes the behavior so that a sequence number is not added to the first instance, so ovs-appctl will connect to that be default. This commit also uses the same convention for naming the log file. Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- tutorial/ovs-sandbox | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox index 3fab1c0ccc98..62ec537e8d22 100755 --- a/tutorial/ovs-sandbox +++ b/tutorial/ovs-sandbox @@ -529,16 +529,18 @@ if $ovn; then OVN_CTRLR_PKI="" fi for i in $(seq $n_northds); do + if [ $i -eq 1 ]; then inst=""; else inst=$i; fi rungdb $gdb_ovn_northd $gdb_ovn_northd_ex ovn-northd --detach \ - --no-chdir --pidfile=ovn-northd$i.pid -vconsole:off \ - --log-file=ovn-northd$i.log -vsyslog:off \ + --no-chdir --pidfile=ovn-northd${inst}.pid -vconsole:off \ + --log-file=ovn-northd${inst}.log -vsyslog:off \ --ovnsb-db="$OVN_SB_DB" --ovnnb-db="$OVN_NB_DB" done for i in $(seq $n_controllers); do + if [ $i -eq 1 ]; then inst=""; else inst=$i; fi rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \ $OVN_CTRLR_PKI --detach --no-chdir -vsyslog:off \ - --log-file=ovn-controller$i.log \ - --pidfile=ovn-controller$i.pid -vconsole:off + --log-file=ovn-controller${inst}.log \ + --pidfile=ovn-controller${inst}.pid -vconsole:off done rungdb $gdb_ovn_controller_vtep $gdb_ovn_controller_vtep_ex \ ovn-controller-vtep --detach --no-chdir --pidfile -vconsole:off \