From patchwork Mon Aug 5 18:15:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Michelson X-Patchwork-Id: 1142418 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=fail (p=none dis=none) header.from=redhat.com 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 462Qst5406z9sBF for ; Tue, 6 Aug 2019 04:15:13 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B5C15E34; Mon, 5 Aug 2019 18:15:10 +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 16CF3DD8 for ; Mon, 5 Aug 2019 18:15:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A08728B0 for ; Mon, 5 Aug 2019 18:15:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B03D3086208 for ; Mon, 5 Aug 2019 18:15:09 +0000 (UTC) Received: from monae.redhat.com (ovpn-122-92.rdu2.redhat.com [10.10.122.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33EEE19C78 for ; Mon, 5 Aug 2019 18:15:08 +0000 (UTC) From: Mark Michelson To: dev@openvswitch.org Date: Mon, 5 Aug 2019 14:15:07 -0400 Message-Id: <20190805181507.30536-1-mmichels@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 05 Aug 2019 18:15:09 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 ovn] RHEL: Suppress systemd status message during pre-installation. 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 When running the pre-installation hook, the spec file attempts to determine if the old openvswitch-provided OVN services are running. If this is a fresh installation, then there never was an openvswitch-provided service installed on the machine. Therefore, systemd will emit a warning saying the service can't be found. There is nothing that indicates that this message is coming pre-installation, and so it appears as though something has gone wrong while trying to install the package. This commit suppresses stderr when checking the status of the ovn services pre-installation. This way, if a problem is encountered, it does not appear that there was an error during installation. Signed-off-by: Mark Michelson Acked-by: Numan Siddique --- rhel/ovn-fedora.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in index 2ecc629f2..2234e949f 100644 --- a/rhel/ovn-fedora.spec.in +++ b/rhel/ovn-fedora.spec.in @@ -219,7 +219,7 @@ rm -rf $RPM_BUILD_ROOT %pre central if [ $1 -eq 1 ] ; then # Package install. - /bin/systemctl status ovn-northd.service >/dev/null + /bin/systemctl status ovn-northd.service &>/dev/null ovn_status=$? rpm -ql openvswitch-ovn-central > /dev/null if [[ "$?" = "0" && "$ovn_status" = "0" ]]; then @@ -233,7 +233,7 @@ fi %pre host if [ $1 -eq 1 ] ; then # Package install. - /bin/systemctl status ovn-controller.service >/dev/null + /bin/systemctl status ovn-controller.service &>/dev/null ovn_status=$? rpm -ql openvswitch-ovn-host > /dev/null if [[ "$?" = "0" && "$ovn_status" = "0" ]]; then