Error oom if container has not stopped
The oom control file may not exist if the container is short lived and exits before we can open it. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
1bb6821084
commit
28f9453fbb
1 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue