diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-04 13:19:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 13:19:35 -0400 |
commit | 4f31ade2b251514992dec7cfe9444dd0c62f00b5 (patch) | |
tree | b71846639dc1c0d2b3206c26afbf0fb9f8b507c5 /pkg | |
parent | aecb2023d240b69690f35721efcee7d724eba3f5 (diff) | |
parent | 164b64ea3baa8502a23fc0c7674f4a7e60507aa0 (diff) | |
download | podman-4f31ade2b251514992dec7cfe9444dd0c62f00b5.tar.gz podman-4f31ade2b251514992dec7cfe9444dd0c62f00b5.tar.bz2 podman-4f31ade2b251514992dec7cfe9444dd0c62f00b5.zip |
Merge pull request #13765 from giuseppe/do-not-set-oom-score-adj
specgen: do not set OOMScoreAdj by default
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/entities/pods.go | 2 | ||||
-rw-r--r-- | pkg/specgenutil/specgen.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index da93d3f8b..8406ca019 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -210,7 +210,7 @@ type ContainerCreateOptions struct { Name string `json:"container_name"` NoHealthCheck bool OOMKillDisable bool - OOMScoreAdj int + OOMScoreAdj *int Arch string OS string Variant string diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index 186d3862b..7d4fca846 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -753,8 +753,8 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions s.PreserveFDs = c.PreserveFDs } - if s.OOMScoreAdj == nil || c.OOMScoreAdj != 0 { - s.OOMScoreAdj = &c.OOMScoreAdj + if s.OOMScoreAdj == nil || c.OOMScoreAdj != nil { + s.OOMScoreAdj = c.OOMScoreAdj } if c.Restart != "" { splitRestart := strings.Split(c.Restart, ":") |