summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-05-10 16:22:16 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-05-13 10:48:17 +0200
commit42e65c57c28ae621ce0b75cd0bb0a9fecba1434c (patch)
tree7debf5d4070e18d17febc67ef7805ca6488dcef0 /cmd/podman/shared
parent8e88461511e81d2327e4c1a1315bb58fda1827ca (diff)
downloadpodman-42e65c57c28ae621ce0b75cd0bb0a9fecba1434c.tar.gz
podman-42e65c57c28ae621ce0b75cd0bb0a9fecba1434c.tar.bz2
podman-42e65c57c28ae621ce0b75cd0bb0a9fecba1434c.zip
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>
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r--cmd/podman/shared/create_cli.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/shared/create_cli.go b/cmd/podman/shared/create_cli.go
index f731e8db5..7f158b09a 100644
--- a/cmd/podman/shared/create_cli.go
+++ b/cmd/podman/shared/create_cli.go
@@ -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