From patchwork Wed Jun 8 02:46:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Terry Wilson X-Patchwork-Id: 1640308 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" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PbzrlRgG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LHs7w4nJkz9sG0 for ; Wed, 8 Jun 2022 12:47:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C0C28424CE; Wed, 8 Jun 2022 02:47:04 +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 NEUDS8Gg0OO3; Wed, 8 Jun 2022 02:47:03 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6BC62424D9; Wed, 8 Jun 2022 02:47:02 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3E1F6C0082; Wed, 8 Jun 2022 02:47:00 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C11F7C002D for ; Wed, 8 Jun 2022 02:46:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A2B8B405D7 for ; Wed, 8 Jun 2022 02:46:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ObdiH9GfTaFe for ; Wed, 8 Jun 2022 02:46:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 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 F25D1400BF for ; Wed, 8 Jun 2022 02:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654656416; 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=VKiX34bipnlictwVUmuW1bpzBHbWhnAoYN+zRkajaKM=; b=PbzrlRgGCs7nyRNBpaimJC8TtyrUTIQvtmf5cwsZqXjlcdoAxBojr8ZrBrMLjs+2Zx17KD kL9fkkVG/zPPvEVHTeeUeqwvFjN8xlyb/WxjCTPo3XA66Eafk7eWzi2ujjAspADZFxmw+V iBDDTdS3gJQ6DMoFOo3Z8NP+SRT/FVU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-36-zCxug08xPFSwyk6LhqNmEQ-1; Tue, 07 Jun 2022 22:46:55 -0400 X-MC-Unique: zCxug08xPFSwyk6LhqNmEQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88922833973 for ; Wed, 8 Jun 2022 02:46:55 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.33.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BAD918EA1; Wed, 8 Jun 2022 02:46:55 +0000 (UTC) From: Terry Wilson To: dev@openvswitch.org Date: Tue, 7 Jun 2022 21:46:53 -0500 Message-Id: <20220608024653.3118045-2-twilson@redhat.com> In-Reply-To: <20220608024653.3118045-1-twilson@redhat.com> References: <20220608024653.3118045-1-twilson@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=twilson@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v4 2/2] Ensure pid belongs to ovsdb-server in ovn-ctl 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" When checking if ovsdb-server is running, ensure that the binary we are going to run matches the one actually running with the the pid that was in our pidfile. Signed-off-by: Terry Wilson --- utilities/ovn-ctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl index 14d37a3d6..e2f05915b 100755 --- a/utilities/ovn-ctl +++ b/utilities/ovn-ctl @@ -200,7 +200,7 @@ start_ovsdb__() { ovn_install_dir "$ovn_etcdir" # Check and eventually start ovsdb-server for DB - if pidfile_is_running $db_pid_file; then + if pidfile_is_running $db_pid_file ovsdb-server; then return fi