2016-02-29 22:15:16 +00:00
|
|
|
package supervisor
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/Sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
type OOMTask struct {
|
|
|
|
baseTask
|
|
|
|
ID string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Supervisor) oom(t *OOMTask) error {
|
|
|
|
logrus.WithField("id", t.ID).Debug("containerd: container oom")
|
|
|
|
s.notifySubscribers(Event{
|
|
|
|
Timestamp: time.Now(),
|
|
|
|
ID: t.ID,
|
2016-04-19 11:02:37 +00:00
|
|
|
Type: StateOOM,
|
2016-02-29 22:15:16 +00:00
|
|
|
})
|
|
|
|
return nil
|
|
|
|
}
|