mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
systemd: Introduce systemd_service_limitnofile_extra_in
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c8ae549cd5
commit
3b16a13f14
@ -62,6 +62,7 @@ if conf.has('WITH_CH')
|
||||
'name': 'Cloud Hypervisor',
|
||||
'service_extra_in': [
|
||||
files('virtchd.service.extra.in'),
|
||||
systemd_service_limitnofile_extra_in,
|
||||
],
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,6 @@ After=remote-fs.target
|
||||
|
||||
[Service]
|
||||
KillMode=process
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
||||
# 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
|
||||
|
@ -144,6 +144,9 @@ if conf.has('WITH_LIBVIRTD')
|
||||
virt_daemon_units += {
|
||||
'service': 'virtlockd',
|
||||
'service_in': files('virtlockd.service.in'),
|
||||
'service_extra_in': [
|
||||
systemd_service_limitnofile_extra_in,
|
||||
],
|
||||
'name': 'locking',
|
||||
'sockets': [ 'main', 'admin' ],
|
||||
'socket_in': files('virtlockd.socket.in'),
|
||||
|
@ -17,10 +17,6 @@ ExecReload=/bin/kill -USR1 $MAINPID
|
||||
# cause the machine to be fenced (rebooted), so make
|
||||
# sure we discourage OOM killer
|
||||
OOMScoreAdjust=-900
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -91,6 +91,9 @@ if conf.has('WITH_LIBVIRTD')
|
||||
virt_daemon_units += {
|
||||
'service': 'virtlogd',
|
||||
'service_in': files('virtlogd.service.in'),
|
||||
'service_extra_in': [
|
||||
systemd_service_limitnofile_extra_in,
|
||||
],
|
||||
'name': 'logging',
|
||||
'sockets': [ 'main', 'admin' ],
|
||||
'socket_in': files('virtlogd.socket.in'),
|
||||
|
@ -17,10 +17,6 @@ ExecReload=/bin/kill -USR1 $MAINPID
|
||||
# cause the machine to be fenced (rebooted), so make
|
||||
# sure we discourage OOM killer
|
||||
OOMScoreAdjust=-900
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -167,6 +167,7 @@ if conf.has('WITH_LXC')
|
||||
'name': 'LXC',
|
||||
'service_extra_in': [
|
||||
files('virtlxcd.service.extra.in'),
|
||||
systemd_service_limitnofile_extra_in,
|
||||
],
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,6 @@ After=remote-fs.target
|
||||
|
||||
[Service]
|
||||
KillMode=process
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
||||
# 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
|
||||
|
@ -191,6 +191,11 @@ virt_test_aug_dir = datadir / 'augeas' / 'lenses' / 'tests'
|
||||
# guest unit files to install
|
||||
guest_unit_files = []
|
||||
|
||||
# systemd_*_extra_in:
|
||||
# snippets that are shared by multiple units
|
||||
# can be used in service_extra_in/socket_extra_in (see below)
|
||||
systemd_service_limitnofile_extra_in = files('virtd.service.limitnofile.extra.in')
|
||||
|
||||
# virt_daemon_units:
|
||||
# generate libvirt daemon systemd unit files
|
||||
# * service - name of the service (required)
|
||||
|
@ -186,6 +186,7 @@ if conf.has('WITH_QEMU')
|
||||
'name': 'QEMU',
|
||||
'service_extra_in': [
|
||||
files('virtqemud.service.extra.in'),
|
||||
systemd_service_limitnofile_extra_in,
|
||||
],
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,6 @@ After=remote-fs.target
|
||||
|
||||
[Service]
|
||||
KillMode=process
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
||||
# 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
|
||||
|
@ -33,10 +33,6 @@ ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
||||
# 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
|
||||
|
@ -191,6 +191,9 @@ if conf.has('WITH_REMOTE')
|
||||
virt_daemon_units += {
|
||||
'service': 'libvirtd',
|
||||
'service_in': files('libvirtd.service.in'),
|
||||
'service_extra_in': [
|
||||
systemd_service_limitnofile_extra_in,
|
||||
],
|
||||
'name': 'legacy monolithic',
|
||||
'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ],
|
||||
'socket_in': files('libvirtd.socket.in'),
|
||||
|
5
src/virtd.service.limitnofile.extra.in
Normal file
5
src/virtd.service.limitnofile.extra.in
Normal file
@ -0,0 +1,5 @@
|
||||
[Service]
|
||||
# Raise hard limits to match behaviour of systemd >= 240.
|
||||
# During startup, daemon will set soft limit to match hard limit
|
||||
# per systemd recommendations
|
||||
LimitNOFILE=1024:524288
|
Loading…
Reference in New Issue
Block a user