From 7b69b99db7c1b762495db60aab0fc5bce8c20796 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 9 Sep 2020 10:18:00 -0400 Subject: Make oom-score-adj actually work During the redesign of podman 2.0, we dropped the support for --oom-score-adj. Test for this flag was bogus and thus passing when it was broken. Basically just need to set the value in the spec. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1877187 Signed-off-by: Daniel J Walsh --- pkg/specgen/generate/oci.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg') diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go index fd324c6e1..b57ddf1aa 100644 --- a/pkg/specgen/generate/oci.go +++ b/pkg/specgen/generate/oci.go @@ -353,6 +353,9 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseFalse } + if s.OOMScoreAdj != nil { + g.SetProcessOOMScoreAdj(*s.OOMScoreAdj) + } setProcOpts(s, &g) return configSpec, nil -- cgit v1.2.3-54-g00ecf