fix: eventfd leak for v2 runtime with v1 cgroups
There's no OOM monitoring for the v2 cgroups yet, so it seems unlikely that there was a leak in that case. Signed-off-by: Seth Pellegrino <spellegrino@newrelic.com>
This commit is contained in:
parent
9456040acb
commit
66508589d3
@ -330,6 +330,9 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.
|
|||||||
s.eventSendMu.Unlock()
|
s.eventSendMu.Unlock()
|
||||||
return nil, errdefs.ToGRPC(err)
|
return nil, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch r.ExecID {
|
||||||
|
case "":
|
||||||
switch cg := container.Cgroup().(type) {
|
switch cg := container.Cgroup().(type) {
|
||||||
case cgroups.Cgroup:
|
case cgroups.Cgroup:
|
||||||
if err := s.ep.Add(container.ID, cg); err != nil {
|
if err := s.ep.Add(container.ID, cg); err != nil {
|
||||||
@ -349,8 +352,6 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.
|
|||||||
logrus.WithError(errdefs.ErrNotImplemented).Warn("add cg to OOM monitor")
|
logrus.WithError(errdefs.ErrNotImplemented).Warn("add cg to OOM monitor")
|
||||||
}
|
}
|
||||||
|
|
||||||
switch r.ExecID {
|
|
||||||
case "":
|
|
||||||
s.send(&eventstypes.TaskStart{
|
s.send(&eventstypes.TaskStart{
|
||||||
ContainerID: container.ID,
|
ContainerID: container.ID,
|
||||||
Pid: uint32(p.Pid()),
|
Pid: uint32(p.Pid()),
|
||||||
|
Loading…
Reference in New Issue
Block a user