From 3fefcaa1dda7c4c64b5924b0eddc327384d4dcf5 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Wed, 17 May 2017 17:46:53 -0700 Subject: [PATCH] Convert pod cgroupPath to runc format for systemd cgroup Signed-off-by: Mrunal Patel --- server/sandbox_run.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/server/sandbox_run.go b/server/sandbox_run.go index da195759..9fa6bc7e 100644 --- a/server/sandbox_run.go +++ b/server/sandbox_run.go @@ -321,14 +321,16 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest cgroupParent := req.GetConfig().GetLinux().CgroupParent if cgroupParent != "" { if s.config.CgroupManager == "systemd" { - cgPath := cgroupParent + ":" + "crio" + ":" + id - g.SetLinuxCgroupsPath(cgPath) - + cgPath, err := convertCgroupNameToSystemd(cgroupParent, false) + if err != nil { + return nil, err + } + g.SetLinuxCgroupsPath(cgPath + ":" + "crio" + ":" + id) + sb.cgroupParent = cgPath } else { g.SetLinuxCgroupsPath(cgroupParent + "/" + id) - + sb.cgroupParent = cgroupParent } - sb.cgroupParent = cgroupParent } hostNetwork := req.GetConfig().GetLinux().GetSecurityContext().GetNamespaceOptions().HostNetwork