mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +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"
|
"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
|
||||||
|
Reference in New Issue
Block a user