From 13d0b19d4e5abb352eb3401f4a97ed9594fec757 Mon Sep 17 00:00:00 2001 From: Anita Zhang Date: Tue, 23 Feb 2021 00:09:10 -0800 Subject: [PATCH] units: add Conditions for systemd-oomd.service Prompted by https://bugzilla.redhat.com/show_bug.cgi?id=1927148 and https://bugzilla.redhat.com/show_bug.cgi?id=1931181. Adds condition check for cgroups v2 and PSI, which systemd-oomd cannot start without. --- units/systemd-oomd.service.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/units/systemd-oomd.service.in b/units/systemd-oomd.service.in index fd7c8d213db..f264a1bef02 100644 --- a/units/systemd-oomd.service.in +++ b/units/systemd-oomd.service.in @@ -13,6 +13,10 @@ Documentation=man:systemd-oomd.service(8) DefaultDependencies=no Before=multi-user.target shutdown.target Conflicts=shutdown.target +ConditionControlGroupController=v2 +ConditionPathExists=/proc/pressure/cpu +ConditionPathExists=/proc/pressure/io +ConditionPathExists=/proc/pressure/memory [Service] AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE -- 2.47.3