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
|
@ -252,8 +252,12 @@ func (s *Server) createSandboxContainer(containerID string, containerName string
|
|||
}
|
||||
|
||||
if sb.cgroupParent != "" {
|
||||
// NOTE: we only support cgroupfs for now, discussion happens in issue #270.
|
||||
specgen.SetLinuxCgroupsPath(sb.cgroupParent + "/" + containerID)
|
||||
if s.config.CgroupManager == "systemd" {
|
||||
cgPath := sb.cgroupParent + ":" + "ocid" + ":" + containerID
|
||||
specgen.SetLinuxCgroupsPath(cgPath)
|
||||
} else {
|
||||
specgen.SetLinuxCgroupsPath(sb.cgroupParent + "/" + containerID)
|
||||
}
|
||||
}
|
||||
|
||||
capabilities := linux.GetSecurityContext().GetCapabilities()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue