]> xenbits.xensource.com Git - libvirt.git/commitdiff
remote: move timeout arg into sysconf file
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 22 Aug 2019 13:51:06 +0000 (14:51 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 27 Aug 2019 09:30:23 +0000 (10:30 +0100)
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.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/remote/libvirtd.service.in
src/remote/libvirtd.sysconf

index 82892b4f70367a0fa6c1918bca18c1b074dac88e..9c8c54a2ef6bff9afa11bee89189b7b872fd288f 100644 (file)
@@ -26,11 +26,7 @@ Documentation=https://libvirt.org
 [Service]
 Type=notify
 EnvironmentFile=-@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
index 5969518bf2a260f654809bc29099c68ff2dd8c1c..ee9db22bab9aa448eb69dc27eeb708efdb9c8804 100644 (file)
@@ -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.
+LIBVIRTD_ARGS="--timeout 120"
+
+# If systemd socket activation is disabled, then the following
+# can be used to listen on TCP/TLS sockets
 #LIBVIRTD_ARGS="--listen"
 
 # Override Kerberos service keytab for SASL/GSSAPI