[libvirt] [PATCH 2/4] remote: move timeout arg into sysconf file

Ján Tomko jtomko at redhat.com
Mon Aug 26 13:57:19 UTC 2019


On Fri, Aug 23, 2019 at 04:11:41PM +0100, Daniel P. Berrangé wrote:
>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é <berrange at redhat.com>
>---
> 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=https://libvirt.org
> [Service]
> Type=notify
> EnvironmentFile=- at 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=@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS
>+ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
> ExecReload=/bin/kill -HUP $MAINPID
> KillMode=process
> Restart=on-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
>
>-# 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="--timeout 120"

LIBVIRTD_ARGS

>+
>+# If systemd socket activation is disabled, then the following
>+# can be used to listen on TCP/TLS sockets
> #LIBVIRTD_ARGS="--listen"

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190826/899d9b2e/attachment-0001.sig>


More information about the libvir-list mailing list