Merge pull request #189 from docker/oom

Error oom if container has not stopped
This commit is contained in:
Michael Crosby 2016-04-07 10:46:35 -07:00
commit 389483d83f

View file

@ -53,8 +53,10 @@ func (w *worker) Start() {
continue continue
} }
if err := w.s.monitor.MonitorOOM(t.Container); err != nil && err != runtime.ErrContainerExited { if err := w.s.monitor.MonitorOOM(t.Container); err != nil && err != runtime.ErrContainerExited {
if process.State() != runtime.Stopped {
logrus.WithField("error", err).Error("containerd: notify OOM events") logrus.WithField("error", err).Error("containerd: notify OOM events")
} }
}
if err := w.s.monitorProcess(process); err != nil { if err := w.s.monitorProcess(process); err != nil {
logrus.WithField("error", err).Error("containerd: add process to monitor") logrus.WithField("error", err).Error("containerd: add process to monitor")
} }