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,7 +53,9 @@ 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 {
logrus.WithField("error", err).Error("containerd: notify OOM events") if process.State() != runtime.Stopped {
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")