Add support for systemd cgroups
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
parent
5eab56e002
commit
6df58df215
4 changed files with 38 additions and 14 deletions
|
@ -245,8 +245,14 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
|
|||
// setup cgroup settings
|
||||
cgroupParent := req.GetConfig().GetLinux().GetCgroupParent()
|
||||
if cgroupParent != "" {
|
||||
// NOTE: we only support cgroupfs for now, discussion happens in issue #270.
|
||||
g.SetLinuxCgroupsPath(cgroupParent + "/" + containerID)
|
||||
if s.config.CgroupManager == "systemd" {
|
||||
cgPath := sb.cgroupParent + ":" + "ocid" + ":" + containerID
|
||||
g.SetLinuxCgroupsPath(cgPath)
|
||||
|
||||
} else {
|
||||
g.SetLinuxCgroupsPath(sb.cgroupParent + "/" + containerID)
|
||||
|
||||
}
|
||||
sb.cgroupParent = cgroupParent
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue