Skip to content

Commit

Permalink
Merge pull request #3583 from giuseppe/ulimit-host-not-set
Browse files Browse the repository at this point in the history
spec: simplify handling of  --ulimit host
  • Loading branch information
openshift-merge-robot authored Jul 17, 2019
2 parents 04a9cb0 + 2f0ed53 commit 1c02905
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 62 deletions.
14 changes: 1 addition & 13 deletions pkg/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down
42 changes: 0 additions & 42 deletions pkg/spec/spec_linux.go

This file was deleted.

7 changes: 0 additions & 7 deletions pkg/spec/spec_unsupported.go

This file was deleted.

0 comments on commit 1c02905

Please sign in to comment.