Fix cgroup parent

We were using a variable before it was set.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2017-03-03 16:38:46 -08:00
parent 0b6afbd78a
commit 38f497a701

View file

@ -264,11 +264,11 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
cgroupParent := req.GetConfig().GetLinux().CgroupParent
if cgroupParent != "" {
if s.config.CgroupManager == "systemd" {
cgPath := sb.cgroupParent + ":" + "ocid" + ":" + id
cgPath := cgroupParent + ":" + "ocid" + ":" + id
g.SetLinuxCgroupsPath(cgPath)
} else {
g.SetLinuxCgroupsPath(sb.cgroupParent + "/" + id)
g.SetLinuxCgroupsPath(cgroupParent + "/" + id)
}
sb.cgroupParent = cgroupParent