Merge pull request #18512 from euank/18510-fixOomKilled

Set OOMKilled state on any OOM event
Upstream-commit: 967acd56c175b7c0f3ad4236c664730338a94bb8
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2016-01-11 00:09:26 +01:00
3 changed files with 51 additions and 3 deletions

View File

@ -317,8 +317,7 @@ func (m *containerMonitor) shouldRestart(exitCode int) bool {
// received ack from the execution drivers
func (m *containerMonitor) callback(processConfig *execdriver.ProcessConfig, pid int, chOOM <-chan struct{}) error {
go func() {
_, ok := <-chOOM
if ok {
for range chOOM {
m.logEvent("oom")
}
}()