From patchwork Mon Oct 21 00:51:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1180132 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=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 46xJ800Hv5z9sPV for ; Mon, 21 Oct 2019 11:54:56 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id DABB3C11; Mon, 21 Oct 2019 00:51:47 +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 09CECB8F for ; Mon, 21 Oct 2019 00:51:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7A9D1831 for ; Mon, 21 Oct 2019 00:51:43 +0000 (UTC) Received: from localhost.localdomain.localdomain (unknown [216.113.160.71]) (Authenticated sender: hzhou@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 3C4BB100003; Mon, 21 Oct 2019 00:51:40 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Sun, 20 Oct 2019 17:51:05 -0700 Message-Id: <1571619079-75503-6-git-send-email-hzhou@ovn.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1571619079-75503-1-git-send-email-hzhou@ovn.org> References: <1571619079-75503-1-git-send-email-hzhou@ovn.org> 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 Cc: Han Zhou Subject: [ovs-dev] [PATCH ovn 05/19] ovn-lib.in: Fix ovn-ctl status_xxx. 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 Currently ovn-ctl status_xxx (e.g. status_northd) shows "not running" even when the daemon is running, because it is calling daemon_status() which is defined in ovs-ctl using OVS rundir instead of OVN rundir. A new function ovn_daemon_status was introduced to replace daemon_status as part of ovn/ovs split. We could fix the problem by replacing all daemon_status() call to ovn_daemon_status() call. However, this is not necessary because when same function name is defined in both ovn-lib and ovs-lib, the one in ovn-lib will take effect. So this patch simply renames the ovn_daemon_status() back to daemon_status(). Signed-off-by: Han Zhou --- utilities/ovn-lib.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovn-lib.in b/utilities/ovn-lib.in index a8fc9d6..af1b72e 100644 --- a/utilities/ovn-lib.in +++ b/utilities/ovn-lib.in @@ -179,7 +179,7 @@ stop_ovn_daemon () { log_success_msg "$1 is not running" } -ovn_daemon_status () { +daemon_status () { pidfile=$ovn_rundir/$1.pid if test -e "$pidfile"; then if pid=`cat "$pidfile"`; then