[PATCH v2 12/19] remote: make system libvirtd exit when idle via timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we have socket activation available now, we can let the system
libvirtd exit when it is idle. This allows it to still do autostart
when the host boots up, but when nothing was started it will quickly
exit again until some mgmt app connects to the socket.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/remote/libvirtd.service.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 047620f79b..2e51429e7a 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -21,7 +21,11 @@ Documentation=https://libvirt.org
 [Service]
 Type=notify
 EnvironmentFile=-/etc/sysconfig/libvirtd
-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
+# 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 30 $LIBVIRTD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
 KillMode=process
 Restart=on-failure
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux