Ignore the resource limits on cgroups V1 rootless systems

This is a regression for #18052.
When podman ignores the resource limits, s.ResourceLimits needs to be
nil.

[NO NEW TESTS NEEDED]

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
Toshiki Sonoda
2023-08-23 13:46:12 +09:00
parent 7bd60867de
commit c416e45766

View File

@ -30,6 +30,7 @@ func verifyContainerResourcesCgroupV1(s *specgen.SpecGenerator) ([]string, error
// Cgroups V1 rootless system does not support Resource limits
if rootless.IsRootless() {
s.ResourceLimits = nil
return []string{"Resource limits are not supported and ignored on cgroups V1 rootless systems"}, nil
}