From 7b616d4743c94f8be3eb59f8c23ed7a19fb2786d Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Wed, 13 Jan 2016 09:07:40 +0800 Subject: [PATCH] Do not fail if not support OomKillDisable Fixes: #19278 The issue seems existed since we add support for OomKillDisable, OomKillDisable support should not be hard request, we just discard it if not support and move on. Signed-off-by: Qiang Huang --- daemon/daemon_unix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 9ae0e1c5e0..577f91b9a1 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -275,8 +275,9 @@ func verifyContainerResources(resources *containertypes.Resources) ([]string, er logrus.Warnf("You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.") } if resources.OomKillDisable != nil && !sysInfo.OomKillDisable { + warnings = append(warnings, "Your kernel does not support OomKillDisable, OomKillDisable discarded.") + logrus.Warnf("Your kernel does not support OomKillDisable, OomKillDisable discarded.") resources.OomKillDisable = nil - return warnings, fmt.Errorf("Your kernel does not support oom kill disable.") } // cpu subsystem checks and adjustments