• Jun 14th, 2023
    • going through issue/117070 and pull/117793
    • the above issue and pr are to use memory.oom.group from cgroup v2 to kill all the processes running in a group. Before this only the parent process is terminated and all the children are left behind.
    • memory.oom.group allows to kill the entire group incase of oom.
    • there is only a small change in the code base in pkg/kubelet/kuberuntime in the calculateLinuxResources function.
    • https://github.dev/kubernetes/kubernetes/pull/117793
    • //If request is not specified, but limit is, we want request to default to limit

    • the above functionality is implemented here.
    • // runc requires cgroupv2 for unified mode
      	if libcontainercgroups.IsCgroup2UnifiedMode() {
      		resources.Unified = map[string]string{
      			// Ask the kernel to kill all processes in the container cgroup in case of OOM.
      			// See memory.oom.group in https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html for
      			// more info.
      			"memory.oom.group": "1",
      		}
      	}