mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 19:05:24 +00:00
86e27b3506
libvirt-guests has After= dependency for all the sockets and that is enough. With the extra Before= in the service file systemd postpones the start of the socket activated service (when libvirt-guests is trying to connect to the socket) until after libvirt-guests is stopped effectively making `systemctl stop libvirt-guests` deadlock. The reason for that is that all stop jobs are scheduled before any start job. Removing the redundant Before= specification fixes this behaviour. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
52 lines
1.7 KiB
SYSTEMD
52 lines
1.7 KiB
SYSTEMD
[Unit]
|
|
Description=Virtualization qemu daemon
|
|
Conflicts=libvirtd.service
|
|
Requires=virtlogd.socket
|
|
Requires=virtlockd.socket
|
|
Requires=virtqemud.socket
|
|
Requires=virtqemud-ro.socket
|
|
Requires=virtqemud-admin.socket
|
|
Wants=systemd-machined.service
|
|
After=network.target
|
|
After=dbus.service
|
|
After=apparmor.service
|
|
After=local-fs.target
|
|
After=remote-fs.target
|
|
After=systemd-logind.service
|
|
After=systemd-machined.service
|
|
Documentation=man:virtqemud(8)
|
|
Documentation=https://libvirt.org
|
|
|
|
[Service]
|
|
Type=notify
|
|
Environment=VIRTQEMUD_ARGS="--timeout 120"
|
|
EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
|
|
ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=process
|
|
Restart=on-failure
|
|
# At least 1 FD per guest, often 2 (eg qemu monitor + qemu agent).
|
|
# eg if we want to support 4096 guests, we'll typically need 8192 FDs
|
|
# If changing this, also consider virtlogd.service & virtlockd.service
|
|
# limits which are also related to number of guests
|
|
LimitNOFILE=8192
|
|
# The cgroups pids controller can limit the number of tasks started by
|
|
# the daemon, which can limit the number of domains for some hypervisors.
|
|
# A conservative default of 8 tasks per guest results in a TasksMax of
|
|
# 32k to support 4096 guests.
|
|
TasksMax=32768
|
|
# With cgroups v2 there is no devices controller anymore, we have to use
|
|
# eBPF to control access to devices. In order to do that we create a eBPF
|
|
# hash MAP which locks memory. The default map size for 64 devices together
|
|
# with program takes 12k per guest. After rounding up we will get 64M to
|
|
# support 4096 guests.
|
|
LimitMEMLOCK=64M
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
Also=virtlogd.socket
|
|
Also=virtlockd.socket
|
|
Also=virtqemud.socket
|
|
Also=virtqemud-ro.socket
|
|
Also=virtqemud-admin.socket
|