From nobody Wed May 8 09:13:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1658274740; cv=none; d=zohomail.com; s=zohoarc; b=nPkGBwUHs50w/pIBgEEgPtKAtWc2qgIhXhI5oWgQgh+ZfX14QnkXjL2JT5aoSFUMYkA50LzGu7668+iJRe8n+IpbUvmJZKN1fEyDbNN1/uH+7U3zH5g932fcV77p7+g8roCxlCgoDXJrJGdYdijmaCMd5n/gafJPj5QpoLBOTyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658274740; 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=LA81hLrCGMFbPnLjhzMpbavomdpEo8ifb90jXHX86Hk=; b=Nvk6bq3xHnKwHXcYPxiVresbjdkLxl1QMusPFdMxmel1FU1UQHlCMFlV2QFsbj/oj4JRpPoN/jNpid0mRRk180AP8PvpW4K2XCAyCMAFO4P6EhBvLutHyEDbz0HgtcTAuTgUk9Un+f3VbCVK9AoD60M9mW/Xs1ypqCUOjTOk74U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1658274740670168.75133493131716; Tue, 19 Jul 2022 16:52:20 -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-595-4SnJSEUrN_2NMYfa5wRXCQ-1; Tue, 19 Jul 2022 19:52:18 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4F553C01DE4; Tue, 19 Jul 2022 23:52:15 +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 3BD9E1121314; Tue, 19 Jul 2022 23:52:14 +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 E60441947042; Tue, 19 Jul 2022 23:52:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C093B1945DA7 for ; Tue, 19 Jul 2022 23:52:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 93954909FF; Tue, 19 Jul 2022 23:52:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F2E318EA8 for ; Tue, 19 Jul 2022 23:52:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 759E18037B5 for ; Tue, 19 Jul 2022 23:52:12 +0000 (UTC) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70053.outbound.protection.outlook.com [40.107.7.53]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-MKLZlu_wPm-5lILiNDYsXA-1; Tue, 19 Jul 2022 19:52:04 -0400 Received: from AM0PR04MB4899.eurprd04.prod.outlook.com (2603:10a6:208:c5::16) by DB7PR04MB5532.eurprd04.prod.outlook.com (2603:10a6:10:88::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Tue, 19 Jul 2022 23:52:01 +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; Tue, 19 Jul 2022 23:52:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658274739; 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=LA81hLrCGMFbPnLjhzMpbavomdpEo8ifb90jXHX86Hk=; b=EEnTAQwhs5zlMuHF7Go5h/7DKNPe9WnXqcDTvZVGIN0WEZhfGhJxdCIOjUwTIbrbZyl1Dt CjjNbOI1/cYLfEU12T2jwk1hCiefMxFoUACH9zmWQAf3sL5/ul9xvWvbsjSOhLThQ57DBN QLt+WwB28F7aZ6R8erJIV7s/NTUfhSE= X-MC-Unique: 4SnJSEUrN_2NMYfa5wRXCQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: MKLZlu_wPm-5lILiNDYsXA-1 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH] spec: Restart sockets even when libvirtd is inactive Date: Tue, 19 Jul 2022 17:51:57 -0600 Message-ID: <20220719235157.15653-1-jfehlig@suse.com> X-ClientProxiedBy: AM5PR0402CA0013.eurprd04.prod.outlook.com (2603:10a6:203:90::23) 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: 51babdf5-88b0-4316-5319-08da69e1ac9e X-MS-TrafficTypeDiagnostic: DB7PR04MB5532:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: MhnNVvH8DHnbauA6ZeanJPcs49hT0B+WhsqnPNSb50idAmbFChtaVw2gePRxo7+CQWB1Vq2xZ9lZe7AQK8GbNKM49my+nmA0AntgPU47Q3Vg+eNjyGCtfxK1Y2AdxhBx5t7SREl6b2EKirnYRJU75f/5NoRKtHlWm2oeeSSTOcvG9thyGyFapFHWaCg2xxuAA5NQ4qa7PdnWdgDG3kafHgp/WVwTo0Asbi/Qt/qdJEVcNetRQKNcFfcyk/NVeN90XtiC5KpoYIySTHOmMh2CdJSBflJD18JF4ktQ4VfdvEA1YyG4dN6K7H1Ehy4Z4UP/Ip1XPQroS3lgQpqIngBX46ud03JfVS4b7l/0PaB9Zomt3mo9sKiMt2rsPxE3MRtEVW4pcx3ejopSVu4FMCbrZUNK2rcGs5v0iQWlMmgUSaopctUm277kaWiYdADCtWc/PXhKyH7jiUjnOSFoadOtOwJEfHupzv/kMjEQIv0hZ+DcFOML1A+Dd6g2GhM2vf6nFW+OAt/RKLONjxPE/cGr5xzOd5JI+oGGneC31bMMmdef6odTCMX0Q5023Swx2lHO0IuXiYVdWEGhwkTSr6QhUEsgB8RgZZ/LqNMAqb7YB4bI723bTsQGLxgvFklF5sEPAN+H9+ZgswfGoklbvf6gaxN0lO4MEGAs3kI6bWCyXUrBkn56e/siDbZpIp3kJSroy4Bi5wZoTjSjEZchU5Ne7JWlobIx/KOVUekcm758EZ76hzJYw4vnkD2IK0T0mFnc 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)(346002)(376002)(136003)(366004)(396003)(39860400002)(66476007)(66946007)(6916009)(66556008)(8676002)(8936002)(1076003)(5660300002)(36756003)(86362001)(316002)(83380400001)(2616005)(38100700002)(186003)(26005)(6666004)(6506007)(6512007)(41300700001)(478600001)(2906002)(6486002); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pVUpBoE9DXTNXxqBUnMNQtDc00p6zLevp9bGQSO3tBIJVPp8YrILYwPEGWSn?= =?us-ascii?Q?Vd5URhmsR1ge2PhF0YqL5TTUwWDaPjjERcAJPPb4uSnbAf2dEbmOpyvn74Cv?= =?us-ascii?Q?F+4OjC8teMMeXU5nBYahP7v3RDsNwxmdjJUFTt2tsZ5izBGW+3DJ6ChUfQ+p?= =?us-ascii?Q?w9z/ELi9IEdO7n4m2ZL4BpeQhxbLhSPAd2F2c9WXzQAJ+//1PIIJYgXAcQ9p?= =?us-ascii?Q?+JemxFF8Hi/q7kh/Y7l7qQ1GIwdKPIBvwwnbij688KDVGVowz8z5hqS3pB27?= =?us-ascii?Q?zcVVDDFxsVmre2piHicLD9S6tspjBXSueEXSfcvUUejAovvSP/A33hRBlovl?= =?us-ascii?Q?kCJmzjUi0K/Vgamw7eSj6M1h4RKY8wxa3gqlqCM4WsRzTB9NCVkxai5VIKht?= =?us-ascii?Q?M75friVrhd5ngGwZKVBMbfHij8767UKlOMIJt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q?LY0ZlCcV4MGC/V+WCDYbMs7fT+BqS8G2OryhLhJEwxS73Y/4L33M+srOJuAi?= =?us-ascii?Q?ORd4rJRxRq3UJLDu1OV1cMTKKdXu2NDc8+QYmQufAZnt6Jo8RaUT+D8XLDK4?= =?us-ascii?Q?4VfrYL4ERKThXK6mGWVQCydYMCCQgRDC/fUJB4k4ZxBKnWLW65o6aJjrmXCv?= =?us-ascii?Q?8DR9+Ywha5E8meeZjQcVIf3R74jaWG1zkgYwfRRBj25+uKfUsY1/1Oc3Gxe2?= =?us-ascii?Q?9Oll6F1prnANpiPZQKMcngcsNtL5wh2lHfpFXunD?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51babdf5-88b0-4316-5319-08da69e1ac9e X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4899.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2022 23:52:01.2524 (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: JCRoqs2rkplEzQ3mvZ+u07cyXWxvgqoooJSTlyNVcl1YbItSX2jaDqwElzQMM32Fey4LmIm3rRFVgoKJ6d8YMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5532 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.79 on 10.11.54.5 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.3 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: 1658274743240100001 Content-Type: text/plain; charset="utf-8" By default libvirtd will terminate itself after 120 seconds, so it is likely that the daemon will not be running at package upgrade. Try restarting sockets even if the daemon is inactive. Signed-off-by: Jim Fehlig --- Assuming sockets need restarted on package update? libvirt.spec.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 9d788b790f..5201a14431 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1365,16 +1365,19 @@ 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 + is_active=3Dno /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 if test $? =3D 0 then + is_active=3Dyes /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 || : - + fi + /bin/systemctl try-restart \ + libvirtd.socket \ + libvirtd-ro.socket \ + libvirtd-admin.socket >/dev/null 2>&1 || : + if test "$is_active" =3D yes + then /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : fi fi --=20 2.36.1