Add "OOM killed" event based on OOM state information
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp) Upstream-commit: 44cab4a4ff05cb1e499fba19394aadb20fc887b8 Component: engine
This commit is contained in:
@@ -154,6 +154,9 @@ func (m *containerMonitor) Start() error {
|
||||
|
||||
if m.shouldRestart(exitStatus.ExitCode) {
|
||||
m.container.SetRestarting(&exitStatus)
|
||||
if exitStatus.OOMKilled {
|
||||
m.container.LogEvent("oom")
|
||||
}
|
||||
m.container.LogEvent("die")
|
||||
m.resetContainer(true)
|
||||
|
||||
@@ -170,6 +173,9 @@ func (m *containerMonitor) Start() error {
|
||||
continue
|
||||
}
|
||||
m.container.ExitCode = exitStatus.ExitCode
|
||||
if exitStatus.OOMKilled {
|
||||
m.container.LogEvent("oom")
|
||||
}
|
||||
m.container.LogEvent("die")
|
||||
m.resetContainer(true)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user