mirror of
https://github.com/containers/podman
synced 2024-10-21 01:34:37 +00:00
rootless: allow cgroupfs manager on cgroups v2
if there are no resources specified, make sure the OCI resources block is empty so that the OCI runtime won't complain. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
257a985f5a
commit
4ad2cd54a1
|
@ -387,6 +387,9 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !addedResources {
|
||||
configSpec.Linux.Resources = &spec.LinuxResources{}
|
||||
}
|
||||
if addedResources && !cgroup2 {
|
||||
return nil, errors.New("invalid configuration, cannot set resources with rootless containers not using cgroups v2 unified mode")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue