From df83d361e4fe3c1fc1939b096cb21aa2e7ec3d74 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 21 Mar 2018 11:28:16 -0400 Subject: Major fixes to systemd cgroup handling Signed-off-by: Matthew Heon Closes: #507 Approved by: baude --- cmd/podman/run.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 5247f536c..79e238da0 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -123,11 +123,13 @@ func runCmd(c *cli.Context) error { return err } - if logrus.GetLevel() == logrus.DebugLevel { - logrus.Debugf("New container created %q", ctr.ID()) + logrus.Debugf("New container created %q", ctr.ID()) - p, _ := ctr.CGroupPath()("") - logrus.Debugf("container %q has CgroupParent %q", ctr.ID(), p) + if logrus.GetLevel() == logrus.DebugLevel { + cgroupPath, err := ctr.CGroupPath() + if err == nil { + logrus.Debugf("container %q has CgroupParent %q", ctr.ID(), cgroupPath) + } } createConfigJSON, err := json.Marshal(createConfig) -- cgit v1.2.3-54-g00ecf