From: Anita Zhang Date: Tue, 23 Feb 2021 08:09:10 +0000 (-0800) Subject: units: add Conditions for systemd-oomd.service X-Git-Tag: v248-rc2~6^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13d0b19d4e5abb352eb3401f4a97ed9594fec757;p=thirdparty%2Fsystemd.git 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. --- 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