Merge pull request #19281 from hqhq/hq_dont_fail_oomkilldisable

Do not fail if not support OomKillDisable
This commit is contained in:
Phil Estes 2016-01-12 21:54:38 -08:00
Родитель 47d87d3b92 7b616d4743
Коммит 9232c09cd5
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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