| From 510547bbc2f6a7667c2f6bb1ac93231998370ee6 Mon Sep 17 00:00:00 2001 |
| From: Nandhini Rengaraj <nrengaraj@google.com> |
| Date: Mon, 24 Apr 2023 17:52:37 +0000 |
| Subject: [PATCH] Add cgroup parent to PodSandboxConfig |
| |
| In COS, runc and containerd both used systemd-cgroup manager. the containerd-cri plugin |
| creates cgroupsPath as expected by systemd cgroups only if pod-sandbox |
| config has a cgroup parent that ends with ".slice" - |
| https://github.com/containerd/containerd/blob/main/pkg/cri/server/helpers_linux.go#L67. |
| --- |
| integration/main_test.go | 4 +++- |
| 1 file changed, 3 insertions(+), 1 deletion(-) |
| |
| diff --git a/integration/main_test.go b/integration/main_test.go |
| index 5e86ec934..673398586 100644 |
| --- a/integration/main_test.go |
| +++ b/integration/main_test.go |
| @@ -217,7 +217,9 @@ func PodSandboxConfig(name, ns string, opts ...PodSandboxOpts) *runtime.PodSandb |
| Uid: util.GenerateID(), |
| Namespace: Randomize(ns), |
| }, |
| - Linux: &runtime.LinuxPodSandboxConfig{}, |
| + Linux: &runtime.LinuxPodSandboxConfig{ |
| + CgroupParent: "system.slice", |
| + }, |
| Annotations: make(map[string]string), |
| Labels: make(map[string]string), |
| } |
| -- |
| 2.40.0.634.g4ca3ef3211-goog |
| |