diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-21 12:49:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 12:49:15 +0200 |
commit | 773b9ac9d059a66280ac50163a17bc705bde0a60 (patch) | |
tree | 5ec3419003ce1d43b4a8e3a81320e20cb47e7810 /pkg | |
parent | e43a98e512603d8608144efbcd3e9dde5759823f (diff) | |
parent | 14fe39968f986696b385b942fa4248e1b5c42384 (diff) | |
download | podman-773b9ac9d059a66280ac50163a17bc705bde0a60.tar.gz podman-773b9ac9d059a66280ac50163a17bc705bde0a60.tar.bz2 podman-773b9ac9d059a66280ac50163a17bc705bde0a60.zip |
Merge pull request #3169 from giuseppe/rootless-empty-res-cgroup1
rootless: force resources to be nil on cgroup v1
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/spec/spec.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index df303db6d..0d953ff6f 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -357,6 +357,10 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM if addedResources && !cgroup2 { return nil, errors.New("invalid configuration, cannot set resources with rootless containers not using cgroups v2 unified mode") } + if !cgroup2 { + // Force the resources block to be empty instead of having default values. + configSpec.Linux.Resources = &spec.LinuxResources{} + } } // Make sure that the bind mounts keep options like nosuid, noexec, nodev. |