Convert pod cgroupPath to runc format for systemd cgroup
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
parent
d3bc6ab693
commit
3fefcaa1dd
1 changed files with 7 additions and 5 deletions
|
@ -321,15 +321,17 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
hostNetwork := req.GetConfig().GetLinux().GetSecurityContext().GetNamespaceOptions().HostNetwork
|
||||
|
||||
|
|
Loading…
Reference in a new issue