Daemon: passdown the --oom-kill-disable option to containerd
Current implementaion of docke daemon doesn't pass down the `--oom-kill-disable` option specified by the end user to the containerd when spawning a new docker instance with help from `runc` component, which results in the `--oom-kill-disable` doesn't work no matter the flag is `true` or `false`. This PR will fix this issue reported by #36090 Signed-off-by: Dennis Chen <dennis.chen@arm.com> Signed-off-by: Jianyong Wu <jianyong.wu@arm.com> Upstream-commit: 44b074d199de84b9af8cc94005fbed4f76bd9ab8 Component: engine
This commit is contained in:
@ -103,6 +103,10 @@ func getMemoryResources(config containertypes.Resources) *specs.LinuxMemory {
|
||||
memory.Swappiness = &swappiness
|
||||
}
|
||||
|
||||
if config.OomKillDisable != nil {
|
||||
memory.DisableOOMKiller = config.OomKillDisable
|
||||
}
|
||||
|
||||
if config.KernelMemory != 0 {
|
||||
memory.Kernel = &config.KernelMemory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user