mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
create: skip resources validation with cgroup v2
skip resources validation when cgroup v2 is detected, as we don't support it yet. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
"github.com/containers/libpod/cmd/podman/shared/parse"
|
||||
cc "github.com/containers/libpod/pkg/spec"
|
||||
"github.com/containers/libpod/pkg/sysinfo"
|
||||
"github.com/containers/libpod/pkg/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -76,6 +77,12 @@ func addWarning(warnings []string, msg string) []string {
|
||||
|
||||
func verifyContainerResources(config *cc.CreateConfig, update bool) ([]string, error) {
|
||||
warnings := []string{}
|
||||
|
||||
cgroup2, err := util.IsCgroup2UnifiedMode()
|
||||
if err != nil || cgroup2 {
|
||||
return warnings, err
|
||||
}
|
||||
|
||||
sysInfo := sysinfo.New(true)
|
||||
|
||||
// memory subsystem checks and adjustments
|
||||
|
Reference in New Issue
Block a user