Open
Description
Currently it checks "" (empty string), if cgroup2 is false:
// HasMemoryCgroup checks whether it is possible to set memory limit for cgroup.
func HasMemoryCgroup() bool {
memcg := true
if runtime.GOOS == "linux" {
var memory string
if cgroup2, err := IsCgroup2UnifiedMode(); err == nil && cgroup2 {
memory = "/sys/fs/cgroup/memory/memsw.limit_in_bytes"
}
if _, err := os.Stat(memory); os.IsNotExist(err) {
klog.Warning("Your kernel does not support memory limit capabilities or the cgroup is not mounted.")
memcg = false
}
}
return memcg
}
Since 7b0bf57
Most likely the code is also wrong for cgroups v2 as well ?
The end result is no memory limits, for the docker driver.
Seems to be the same issue as in #10935
Metadata
Metadata
Assignees
Labels
Issues related to kubernetes in containerDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Categorizes issue or PR as related to a bug.Indicates that an issue or PR should not be auto-closed due to staleness.Important over the long term, but may not be staffed and/or may need multiple releases to complete.