summaryrefslogtreecommitdiff
path: root/units/systemd-oomd.service.in
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-09-09 16:12:55 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2021-09-20 13:53:11 +0100
commit064a5c1438690f9454ad9bff05ec4ec2acfa67d2 (patch)
treeeb03352f75a79307dd38d86e913b3e1a52521eaf /units/systemd-oomd.service.in
parentf2ed82d5107cfe557470958a7c0857202952aac3 (diff)
downloadsystemd-064a5c1438690f9454ad9bff05ec4ec2acfa67d2.tar.gz
oom: Add support for user unit ManagedOOM property updates
Compared to PID1 where systemd-oomd has to be the client to PID1 because PID1 is a more privileged process than systemd-oomd, systemd-oomd is the more privileged process compared to a user manager so we have user managers be the client whereas systemd-oomd is now the server. The same varlink protocol is used between user managers and systemd-oomd to deliver ManagedOOM property updates. systemd-oomd now sets up a varlink server that user managers connect to to send ManagedOOM property updates. We also add extra validation to make sure that non-root senders don't send updates for cgroups they don't own. The integration test was extended to repeat the chill/bloat test using a user manager instead of PID1.
Diffstat (limited to 'units/systemd-oomd.service.in')
-rw-r--r--units/systemd-oomd.service.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/units/systemd-oomd.service.in b/units/systemd-oomd.service.in
index 44f71c9e36..9f248e2ba4 100644
--- a/units/systemd-oomd.service.in
+++ b/units/systemd-oomd.service.in
@@ -18,6 +18,8 @@ ConditionControlGroupController=memory
ConditionPathExists=/proc/pressure/cpu
ConditionPathExists=/proc/pressure/io
ConditionPathExists=/proc/pressure/memory
+Requires=systemd-oomd.socket
+After=systemd-oomd.socket
[Service]
AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE