mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
Type=oneshot means that the service is only considered started after the main process exits. In setups where libvirt-guests is configured to be used and imposes a delay on the startup of guests, this will cause systemd to report a quite high boot time as it will wait until all guests have booted, plus all the delay between them. High boot times are often reported as issues in monitoring systems, and require operator attention, while in this case there is not really an issue with the system, it's just doing what it was configured to do. With Type=exec, the service is considered started right after the main process is *started*, but the boot process will not wait for it. Having other units depend on libvirt-guests.service finishing was already not reliable because one cannot know how long the OS inside each guest takes to boot, and libvirt-guests already does not wait for them to be in any particular state. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Antonio Terceiro <terceiro@debian.org>
29 lines
707 B
Plaintext
29 lines
707 B
Plaintext
[Unit]
|
|
Description=libvirt guests suspend/resume service
|
|
Documentation=man:libvirt-guests(8)
|
|
Documentation=https://libvirt.org/
|
|
Requires=virt-guest-shutdown.target
|
|
After=network.target
|
|
After=time-sync.target
|
|
After=libvirtd.socket
|
|
After=virtqemud.socket
|
|
After=virtlxcd.socket
|
|
After=virtvboxd.socket
|
|
After=virtvzd.socket
|
|
After=virtxend.socket
|
|
After=virt-guest-shutdown.target
|
|
|
|
[Service]
|
|
EnvironmentFile=-@initconfdir@/libvirt-guests
|
|
# Hack just call traditional service until we factor
|
|
# out the code
|
|
ExecStart=@libexecdir@/libvirt-guests.sh start
|
|
ExecStop=@libexecdir@/libvirt-guests.sh stop
|
|
Type=exec
|
|
RemainAfterExit=yes
|
|
StandardOutput=journal+console
|
|
TimeoutStopSec=0
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|