summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-09-09 10:18:00 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-09-09 10:19:25 -0400
commit7b69b99db7c1b762495db60aab0fc5bce8c20796 (patch)
tree8f9ee9b2e6b35668e7bc147b43e8cf9559a9b5a6 /pkg/specgen
parent6b1a1fcc5cb92a9fd5800b0d1af44f26093a8153 (diff)
downloadpodman-7b69b99db7c1b762495db60aab0fc5bce8c20796.tar.gz
podman-7b69b99db7c1b762495db60aab0fc5bce8c20796.tar.bz2
podman-7b69b99db7c1b762495db60aab0fc5bce8c20796.zip
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 <dwalsh@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/oci.go3
1 files changed, 3 insertions, 0 deletions
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