From nobody Sun Feb 8 16:31:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566573133; cv=none; d=zoho.com; s=zohoarc; b=e9y8eKHqhKq7d2uWQPrNxLcviAP9/iT1SvLEON4BG0k7XCr8BtkQ/t9W8Aw+6VPTOt96jhmeoClpGKkJ16brR0W+90Wsyf/f0k3MecltnNawL5Q0/+Z9jioKxRZgRIdruIrzvbe/p/STbJMYBdiTdebeHKa/uxQqQthXUDvl+6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566573133; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=KeP2KXNH01MtpGaehBucSjEFYrk7c3QbCru6cNhx5Ek=; b=LgyIZzwWluVyefRxlIMkmd/DbWKiBO66n12ftXS84P9GMFryGSLbX0cjpoZXFyZIDgw7Vh8XUr+ExdS1gNegoliEVc+cQm9fbUyCMp7iNuVTt6AzaVj51EPKwN/y5ya1Y3t5W7e/aFHXC4+cDMUIXc4hsshRExhescSmKNNW+/M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566573133854555.1702206957665; Fri, 23 Aug 2019 08:12:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CD4E18C890F; Fri, 23 Aug 2019 15:12:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57D7A5D6B2; Fri, 23 Aug 2019 15:12:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0EBFA180B536; Fri, 23 Aug 2019 15:12:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7NFBr6u003572 for ; Fri, 23 Aug 2019 11:11:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 190732632E; Fri, 23 Aug 2019 15:11:53 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-60.ams2.redhat.com [10.36.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 381822632F; Fri, 23 Aug 2019 15:11:51 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Fri, 23 Aug 2019 16:11:41 +0100 Message-Id: <20190823151143.31787-3-berrange@redhat.com> In-Reply-To: <20190823151143.31787-1-berrange@redhat.com> References: <20190823151143.31787-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/4] remote: move timeout arg into sysconf file X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Fri, 23 Aug 2019 15:12:13 +0000 (UTC) We need to give users the ability to customize the length of the shutdown timeout, or even disable timeouts entirely. Thus we must move the timeout arg into the sysconf file, instead of the service unit. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: J=C3=A1n Tomko --- src/remote/libvirtd.service.in | 6 +----- src/remote/libvirtd.sysconf | 12 +++++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 82892b4f70..9c8c54a2ef 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -26,11 +26,7 @@ Documentation=3Dhttps://libvirt.org [Service] Type=3Dnotify EnvironmentFile=3D-@sysconfdir@/sysconfig/libvirtd -# libvirtd.service is set to run on boot so that autostart of -# VMs can be performed. We don't want it to stick around if -# unused though, so we set a timeout. The socket activation -# then ensures it gets started again if anything needs it -ExecStart=3D@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS +ExecStart=3D@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=3D/bin/kill -HUP $MAINPID KillMode=3Dprocess Restart=3Don-failure diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf index 5969518bf2..2ad1fcf5d5 100644 --- a/src/remote/libvirtd.sysconf +++ b/src/remote/libvirtd.sysconf @@ -1,8 +1,14 @@ # Customizations for the libvirtd.service systemd unit =20 -# Listen for TCP/IP connections. This is not required if using systemd -# socket activation. -# NB. must setup TLS/SSL keys prior to using this +# Default behaviour is for libvirtd.service to start on boot +# so that VM autostart can be performed. We then want it to +# shutdown again if nothing was started and rely on systemd +# socket activation to start it again when some client app +# connects. +LIBVIRT_ARGS=3D"--timeout 120" + +# If systemd socket activation is disabled, then the following +# can be used to listen on TCP/TLS sockets #LIBVIRTD_ARGS=3D"--listen" =20 # Override Kerberos service keytab for SASL/GSSAPI --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list