mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
Merge pull request #3169 from giuseppe/rootless-empty-res-cgroup1
rootless: force resources to be nil on cgroup v1
This commit is contained in:
@ -357,6 +357,10 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
|
|||||||
if addedResources && !cgroup2 {
|
if addedResources && !cgroup2 {
|
||||||
return nil, errors.New("invalid configuration, cannot set resources with rootless containers not using cgroups v2 unified mode")
|
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.
|
// Make sure that the bind mounts keep options like nosuid, noexec, nodev.
|
||||||
|
Reference in New Issue
Block a user