mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Merge pull request #9246 from estesp/add-oom-event
Proposal: Add "OOM killed" event based on OOM state information
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