From nobody Sun May 5 07:04:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1658326394; cv=none; d=zohomail.com; s=zohoarc; b=aDWDM+R6CI/AwgOt2ruLQk/TozZaxxu6L0Ss0Hu9VDR9bzRONUvs0EHBOzwa23IclOdnDIRZ8XQ4I6bRiAjPiOKncZyvih6kEVGKb61bBmmK8P169N3psgQ8Fhvoogr/Kq+Df5oNUBviq6BSsDhH/QzVPxg7mKdYT9dqYtiKizw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658326394; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=WoQKfI+lEQ+5U/9kpEqGZXfmmhL9eLg1ICY2cPXV0cU=; b=V1VtUEA/TD3McLpFMlQkF2SobFf7Zon1ArhWCXc30EMqA6De8/G3pXBUuGVMqtcphkA2RoDmzeaG5bjNZTun8ogxLSyw3EeqRByjTLz/l50NqLrx83w1iyfRuGho95DtTWwULd8Hc1KMsadMTqHJGDbdG2MKI+lLpnzgCdFkcv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1658326394445472.60884715314785; Wed, 20 Jul 2022 07:13:14 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-46-VYQuWkYNOkWfhwjXqAwfAw-1; Wed, 20 Jul 2022 10:13:04 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F51C1C05AB8; Wed, 20 Jul 2022 14:13:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF4792166B26; Wed, 20 Jul 2022 14:13:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F12A9194706C; Wed, 20 Jul 2022 14:12:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A014F1947066 for ; Wed, 20 Jul 2022 14:12:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8CA922026987; Wed, 20 Jul 2022 14:12:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87BBE2026D64 for ; Wed, 20 Jul 2022 14:12:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 69C9E38005D1 for ; Wed, 20 Jul 2022 14:12:28 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150077.outbound.protection.outlook.com [40.107.15.77]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-546-MO_jJp3sOwqE53bKOqIV5w-2; Wed, 20 Jul 2022 10:12:20 -0400 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com (2603:10a6:208:c5::16) by AM7PR04MB6806.eurprd04.prod.outlook.com (2603:10a6:20b:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Wed, 20 Jul 2022 14:12:18 +0000 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com ([fe80::6445:85be:2b65:d60a]) by AM0PR04MB4899.eurprd04.prod.outlook.com ([fe80::6445:85be:2b65:d60a%7]) with mapi id 15.20.5438.023; Wed, 20 Jul 2022 14:12:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658326393; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WoQKfI+lEQ+5U/9kpEqGZXfmmhL9eLg1ICY2cPXV0cU=; b=CR1hpQ0YeNI+2UQ2LuBUf1g81XF32Z+HBfgv6NefVqI01EEflms2mhzGhBpBSyooSb4YZ5 Bzh3o8ihGq9EyF7ZAvFMu6FZQMX0Fr6uJbHocXwdK1NPnbMkU0+oP1nAtP/VMQzj97Jbdu BodXkClanV8Y9ay3OTqf1A367t+XntI= X-MC-Unique: VYQuWkYNOkWfhwjXqAwfAw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: MO_jJp3sOwqE53bKOqIV5w-2 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH] spec: Remove duplicate check of libvirtd status Date: Wed, 20 Jul 2022 08:12:12 -0600 Message-ID: <20220720141212.3544-1-jfehlig@suse.com> X-ClientProxiedBy: MW4PR04CA0241.namprd04.prod.outlook.com (2603:10b6:303:88::6) To AM0PR04MB4899.eurprd04.prod.outlook.com (2603:10a6:208:c5::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32a351bd-4e64-48b0-e60d-08da6a59dac1 X-MS-TrafficTypeDiagnostic: AM7PR04MB6806:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: 8QUeCqkZJRlKSdoiRKa/O08s47mM7KSFGgq3r61X3m+VwcJa9uFAmiCFEk219/mPogOYeYHKDmQw3dwGwNEsDnMzKb5JDQ0twfFOEnxa4Tcfanw4cGKmXDId5RcLedr698dWwzoC/il2QaWBe3/gbJQcqc+Qu/BJUPMcFvEDshqiE7Yg+owXGfSAdTYWGOtIm/7BmItCYMnLyV++YkUryOse1Yqbz9KWUiyAlmkdYIq0FRXTTyPZhxSWDxL90umnrtPSF1iak3XPa467bzfRLtCeHXG/gi5fll389A2Ltj2C3R077RRSwjlKZ2k193JhF6iy3BPvqIhdwGnNDR2NnjtL8SYKVHzCb6X280kEp1bIABhERImynBLwgRwKK7W/Infx+Nfl6qFnws7Opaz5NeTOTnhxwPfvL4T1Yzi09sF8/w01mGzWwuEvjlHZI0Nme213uwV1M/pRSv4ksRObhTvZzGHPHybr7jartQC8riZcprKMPtY1IuuM8SR1/gj7qGCGMerP359Vb2vzViElzHzx6x3wWhVMA9ehUG5Nm85yXwAlXaa2AplcC75ZzNi/0B168vW8SuV1fYYmQ7fWTtcGvGn9CIpadeIfImb8SAHD/jLQU8EmiVvNdV4Zdf70+wlISl2B094pksPBjUlIdQ4TdAiIX5HZt3namxCmrr8lfScF9UwDT8PWcEQVPQJp6LutKxs4tBrBSsCFuPSlhD9g+/9DpsyF65hvuxEIidvuAgpY/ZmiCx9zeM+Bom9NJKn5ZgVF9iirMBBbKWN8jg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4899.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(396003)(366004)(39860400002)(346002)(376002)(66556008)(6666004)(6506007)(966005)(6486002)(6512007)(26005)(478600001)(66946007)(2906002)(41300700001)(66476007)(316002)(36756003)(8676002)(38100700002)(2616005)(8936002)(86362001)(5660300002)(83380400001)(6916009)(186003)(1076003); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7BYdaCIHe8e/WJbAqqOdbZYjU9r0uoskOy0myaGYmNmqdGbI5uR6r4+WzcH2?= =?us-ascii?Q?AawujX0GS8kA/9AKS8KMDKaBHvulW30NLgqtvXtzDnHb0ObkS2gB2DJwkqEs?= =?us-ascii?Q?pEyWuT/F9jvYzjURbbgeyNu8VzcSfogsZGqh9d0M5yaIrL5sHVCJxwdoQCQ1?= =?us-ascii?Q?YJFE3e2lpp0+3GEVBm1k6WM4OH8S0lF9KmSMVhDbZc3HyCI3znasclsQs41D?= =?us-ascii?Q?OpZv5WQDkeFZSwketSBrmNt+mTNtzGA+4yFF4/q1/isRXmJRSpeeN6TmFGk6?= =?us-ascii?Q?ur4AfIs1lCdQ0ATXlpu/BCr9ti3J9w2vOtUwfL1P2IVXs2b6LnT1sZSHPua8?= =?us-ascii?Q?dBUTdHteUWyf5ScbBEPmJrys2nWwKRyNoR3m+/M+PLVwS02l3eJ4E5CnJFVt?= =?us-ascii?Q?uxHRJ6iAJEGU2vAVWo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?= =?us-ascii?Q?Pe7RG+jRLoEOILwZXoZpo0bRYXLQJmvJC9gNK8YxZy11ExOFIG6vc2CnKG91?= =?us-ascii?Q?fBdCT7Qn6I3GEEnQ8Tirrf0h70X4EEEP76LQIMWSMAOeK447KxlSyEJdVHG0?= =?us-ascii?Q?p8JEFZa9euNLFh9VjDgN0/uGmqu9QvMXBk6y0r2bquEbSV97DAbk4sHQt1DN?= =?us-ascii?Q?4u9W3tkGNePPbTauLciaJWWiCVj/VvomXbigInDpzUe62+BVR58OsP17Th0S?= =?us-ascii?Q?61CHVH+VaFRcArI98/gXbBWGwrrUvuuTJrput5XZ?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32a351bd-4e64-48b0-e60d-08da6a59dac1 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4899.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 14:12:18.2057 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: g0MejN4Cz7kcsYi8C3FhG72nP5kTx4/YMaFAEvS08dS8eTORcdHXQGmc2eo26t+Aw7+3Ci61NChe0Li3JaYMaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6806 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658326396191100001 Content-Type: text/plain; charset="utf-8" The %posttrans scriptlet checks if libvirtd is active within a condition that is only executed if libvirtd is active. Remove the duplicate check. Signed-off-by: Jim Fehlig Reviewed-by: Michal Privoznik --- This patch contains an improvement Martin suggested while reviewing another patch to the posttrans scriptlet https://listman.redhat.com/archives/libvir-list/2022-July/232947.html The problem of not restarting socket units if libvird is inactive persists, but it is not clear if socket units need restarted on package update. libvirt.spec.in | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 9d788b790f..a238edf2aa 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1365,18 +1365,12 @@ then # own the sockets again when it comes back up. Thus we must # do this particular ordering, so that we get libvirtd # running with socket activation in use - /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 - if test $? =3D 0 - then - /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || : - - /bin/systemctl try-restart \ - libvirtd.socket \ - libvirtd-ro.socket \ - libvirtd-admin.socket >/dev/null 2>&1 || : - - /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : - fi + /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || : + /bin/systemctl try-restart \ + libvirtd.socket \ + libvirtd-ro.socket \ + libvirtd-admin.socket >/dev/null 2>&1 || : + /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : fi fi =20 --=20 2.36.1