Infer systemd cgroup based on path suffix.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-08-06 10:58:27 -07:00
parent f9760af8d4
commit eae5fc360f
6 changed files with 22 additions and 15 deletions

View File

@@ -352,8 +352,7 @@ func (c *criService) generateSandboxContainerSpec(id string, config *runtime.Pod
specOpts = append(specOpts, customopts.WithDisabledCgroups)
} else {
if config.GetLinux().GetCgroupParent() != "" {
cgroupsPath := getCgroupsPath(config.GetLinux().GetCgroupParent(), id,
c.config.SystemdCgroup)
cgroupsPath := getCgroupsPath(config.GetLinux().GetCgroupParent(), id)
specOpts = append(specOpts, oci.WithCgroup(cgroupsPath))
}
}