From c35d71e3da7a84eae94769e005407cf99d1ccb49 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 7 Oct 2019 19:11:42 -0500 Subject: catch runc v2 error when runc returns an error about not being v2 complient, catch the error and logrus an actionable message for users. Signed-off-by: baude --- libpod/container_internal.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpod') diff --git a/libpod/container_internal.go b/libpod/container_internal.go index a4dcd23be..ac921d737 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -939,6 +939,9 @@ func (c *Container) init(ctx context.Context, retainRetries bool) error { // With the spec complete, do an OCI create if err := c.ociRuntime.createContainer(c, nil); err != nil { + if strings.Contains(err.Error(), "this version of runc doesn't work on cgroups v2") { + logrus.Errorf("oci runtime %q does not support CGroups V2: use system migrate to mitigate", c.ociRuntime.name) + } return err } -- cgit v1.2.3-54-g00ecf