mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
systemd: Introduce systemd_service_oomscoreadjust_extra_in
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5c83da1dfd
commit
28b85e0374
@ -145,6 +145,7 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
'service': 'virtlockd',
|
'service': 'virtlockd',
|
||||||
'service_in': files('virtlockd.service.in'),
|
'service_in': files('virtlockd.service.in'),
|
||||||
'service_extra_in': [
|
'service_extra_in': [
|
||||||
|
systemd_service_oomscoreadjust_extra_in,
|
||||||
systemd_service_limitnofile_extra_in,
|
systemd_service_limitnofile_extra_in,
|
||||||
],
|
],
|
||||||
'name': 'locking',
|
'name': 'locking',
|
||||||
|
@ -13,10 +13,6 @@ Environment=VIRTLOCKD_ARGS=
|
|||||||
EnvironmentFile=-@initconfdir@/virtlockd
|
EnvironmentFile=-@initconfdir@/virtlockd
|
||||||
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
|
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
|
||||||
ExecReload=/bin/kill -USR1 $MAINPID
|
ExecReload=/bin/kill -USR1 $MAINPID
|
||||||
# Losing the locks is a really bad thing that will
|
|
||||||
# cause the machine to be fenced (rebooted), so make
|
|
||||||
# sure we discourage OOM killer
|
|
||||||
OOMScoreAdjust=-900
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -92,6 +92,7 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
'service': 'virtlogd',
|
'service': 'virtlogd',
|
||||||
'service_in': files('virtlogd.service.in'),
|
'service_in': files('virtlogd.service.in'),
|
||||||
'service_extra_in': [
|
'service_extra_in': [
|
||||||
|
systemd_service_oomscoreadjust_extra_in,
|
||||||
systemd_service_limitnofile_extra_in,
|
systemd_service_limitnofile_extra_in,
|
||||||
],
|
],
|
||||||
'name': 'logging',
|
'name': 'logging',
|
||||||
|
@ -13,10 +13,6 @@ Environment=VIRTLOGD_ARGS=
|
|||||||
EnvironmentFile=-@initconfdir@/virtlogd
|
EnvironmentFile=-@initconfdir@/virtlogd
|
||||||
ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
|
ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
|
||||||
ExecReload=/bin/kill -USR1 $MAINPID
|
ExecReload=/bin/kill -USR1 $MAINPID
|
||||||
# Losing the logs is a really bad thing that will
|
|
||||||
# cause the machine to be fenced (rebooted), so make
|
|
||||||
# sure we discourage OOM killer
|
|
||||||
OOMScoreAdjust=-900
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -197,6 +197,7 @@ guest_unit_files = []
|
|||||||
systemd_service_limitnofile_extra_in = files('virtd.service.limitnofile.extra.in')
|
systemd_service_limitnofile_extra_in = files('virtd.service.limitnofile.extra.in')
|
||||||
systemd_service_tasksmax_extra_in = files('virtd.service.tasksmax.extra.in')
|
systemd_service_tasksmax_extra_in = files('virtd.service.tasksmax.extra.in')
|
||||||
systemd_service_limitmemlock_extra_in = files('virtd.service.limitmemlock.extra.in')
|
systemd_service_limitmemlock_extra_in = files('virtd.service.limitmemlock.extra.in')
|
||||||
|
systemd_service_oomscoreadjust_extra_in = files('virtd.service.oomscoreadjust.extra.in')
|
||||||
|
|
||||||
# virt_daemon_units:
|
# virt_daemon_units:
|
||||||
# generate libvirt daemon systemd unit files
|
# generate libvirt daemon systemd unit files
|
||||||
|
5
src/virtd.service.oomscoreadjust.extra.in
Normal file
5
src/virtd.service.oomscoreadjust.extra.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Service]
|
||||||
|
# Losing this daemon is a really bad thing that will
|
||||||
|
# cause the machine to be fenced (rebooted), so make
|
||||||
|
# sure we discourage OOM killer
|
||||||
|
OOMScoreAdjust=-900
|
Loading…
Reference in New Issue
Block a user