diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-07-16 21:00:11 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-07-17 13:01:21 +0200 |
commit | 2f0ed531c7f90e1d2d51871c68de7c813c4931c4 (patch) | |
tree | 425b9da15d79048172ccd770c80d84da093a0c8c /pkg/spec/spec.go | |
parent | a449e9a2cf4b73163df75674059de04488cd2706 (diff) | |
download | podman-2f0ed531c7f90e1d2d51871c68de7c813c4931c4.tar.gz podman-2f0ed531c7f90e1d2d51871c68de7c813c4931c4.tar.bz2 podman-2f0ed531c7f90e1d2d51871c68de7c813c4931c4.zip |
spec: rework --ulimit host
it seems enough to not specify any ulimit block to maintain the host
limits.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r-- | pkg/spec/spec.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index 53b73296a..6d8d399f4 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -20,12 +20,6 @@ import ( const cpuPeriod = 100000 -type systemUlimit struct { - name string - max uint64 - cur uint64 -} - func getAvailableGids() (int64, error) { idMap, err := user.ParseIDMapFile("/proc/self/gid_map") if err != nil { @@ -585,13 +579,7 @@ func addRlimits(config *CreateConfig, g *generate.Generator) error { if len(config.Resources.Ulimit) != 1 { return errors.New("ulimit can use host only once") } - hostLimits, err := getHostRlimits() - if err != nil { - return err - } - for _, i := range hostLimits { - g.AddProcessRlimits(i.name, i.max, i.cur) - } + g.Config.Process.Rlimits = nil break } |