Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libct/cg/sd/v2: "support" (ignore") memory.oom.group
Browse files Browse the repository at this point in the history
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin committed Nov 4, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bab2fab commit 6b1da04
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libcontainer/cgroups/systemd/v2.go
Original file line number Diff line number Diff line change
@@ -128,6 +128,15 @@ func unifiedResToSystemdProps(conn *systemdDbus.Conn, res map[string]string) (pr
newProp("TasksAccounting", true),
newProp("TasksMax", num))

case "memory.oom.group":
// Setting this to 1 is roughly equivalent to OOMPolicy=kill
// (as per systemd.service(5) and
// https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html),
// but it's not clear what to do if it is unset or set
// to 0 in runc update, as there are two other possible
// values for OOMPolicy (continue/stop).
fallthrough

default:
// Ignore the unknown resource here -- will still be
// applied in Set which calls fs2.Set.

0 comments on commit 6b1da04

Please sign in to comment.