Skip to content

Commit

Permalink
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>
  • Loading branch information
kolyshkin committed Nov 4, 2020
1 parent e24365b commit 5ec1cae
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
Expand Up @@ -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.
Expand Down

0 comments on commit 5ec1cae

Please sign in to comment.