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:
parent
8e88461511
commit
42e65c57c2
|
@ -7,6 +7,7 @@ import (
|
||||||
"github.com/containers/libpod/cmd/podman/shared/parse"
|
"github.com/containers/libpod/cmd/podman/shared/parse"
|
||||||
cc "github.com/containers/libpod/pkg/spec"
|
cc "github.com/containers/libpod/pkg/spec"
|
||||||
"github.com/containers/libpod/pkg/sysinfo"
|
"github.com/containers/libpod/pkg/sysinfo"
|
||||||
|
"github.com/containers/libpod/pkg/util"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -76,6 +77,12 @@ func addWarning(warnings []string, msg string) []string {
|
||||||
|
|
||||||
func verifyContainerResources(config *cc.CreateConfig, update bool) ([]string, error) {
|
func verifyContainerResources(config *cc.CreateConfig, update bool) ([]string, error) {
|
||||||
warnings := []string{}
|
warnings := []string{}
|
||||||
|
|
||||||
|
cgroup2, err := util.IsCgroup2UnifiedMode()
|
||||||
|
if err != nil || cgroup2 {
|
||||||
|
return warnings, err
|
||||||
|
}
|
||||||
|
|
||||||
sysInfo := sysinfo.New(true)
|
sysInfo := sysinfo.New(true)
|
||||||
|
|
||||||
// memory subsystem checks and adjustments
|
// memory subsystem checks and adjustments
|
||||||
|
|
Loading…
Reference in New Issue