From 7f23b1baa7ac8d1eea1504fa7a4d21ba48bd1b9e Mon Sep 17 00:00:00 2001 From: Abhranil Chatterjee Date: Fri, 23 Apr 2021 17:22:49 +0530 Subject: [PATCH] feat(iops): Added iops setting for guaranted qos pods (#6) Signed-off-by: Abhranil --- pkg/device/iolimit/utils.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/device/iolimit/utils.go b/pkg/device/iolimit/utils.go index 65a166d..e612293 100644 --- a/pkg/device/iolimit/utils.go +++ b/pkg/device/iolimit/utils.go @@ -97,7 +97,11 @@ func getContainerdPodCGSuffix(podUid string) string { func getContainerdCGPath(podUid string) (string, error) { kubepodsCGPath := baseCgroupPath + "/kubepods.slice" podSuffix := getContainerdPodCGSuffix(podUid) - podCGPath := kubepodsCGPath + "/kubepods-besteffort.slice/kubepods-besteffort-" + podSuffix + ".slice" + podCGPath := kubepodsCGPath + "/kubepods-" + podSuffix + ".slice" + if helpers.DirExists(podCGPath) { + return podCGPath, nil + } + podCGPath = kubepodsCGPath + "/kubepods-besteffort.slice/kubepods-besteffort-" + podSuffix + ".slice" if helpers.DirExists(podCGPath) { return podCGPath, nil }