mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-06 13:20:20 +00:00
839a060890
We already guarantee that virtlogd.socket is enabled/disabled along with libvirtd.service, but if libvirtd.service has just been installed and is started before rebooting, then virtlogd.socket will not be running and guest startup will fail. Add Requires=virtlogd.socket to libvirtd.service to make sure virtlogd.socket is always started along with libvirtd.service, and add Before=libvirtd.service to both virtlogd.socket and virtlogd.service so that virtlogd never disappears before libvirtd has exited. Also add PartOf=libvirtd.service to both virtlogd.socket and virtlogd.service, so that virtlogd can be shut down when not needed. Resolves: https://bugzilla.redhat.com/1372576
33 lines
878 B
SYSTEMD
33 lines
878 B
SYSTEMD
# NB we don't use socket activation. When libvirtd starts it will
|
|
# spawn any virtual machines registered for autostart. We want this
|
|
# to occur on every boot, regardless of whether any client connects
|
|
# to a socket. Thus socket activation doesn't have any benefit
|
|
|
|
[Unit]
|
|
Description=Virtualization daemon
|
|
Requires=virtlogd.socket
|
|
Before=libvirt-guests.service
|
|
After=network.target
|
|
After=dbus.service
|
|
After=iscsid.service
|
|
After=apparmor.service
|
|
After=local-fs.target
|
|
After=remote-fs.target
|
|
Documentation=man:libvirtd(8)
|
|
Documentation=http://libvirt.org
|
|
|
|
[Service]
|
|
Type=notify
|
|
EnvironmentFile=-/etc/sysconfig/libvirtd
|
|
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=process
|
|
Restart=on-failure
|
|
# Override the maximum number of opened files
|
|
#LimitNOFILE=2048
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
Also=virtlockd.socket
|
|
Also=virtlogd.socket
|