Merge pull request #3419 from AkihiroSuda/fix-task-start

runtime/v1/linux: ignore ErrCgroupDeleted in Task.Start
This commit is contained in:
Michael Crosby
2019-07-17 09:56:50 -04:00
committed by GitHub

View File

@@ -124,11 +124,15 @@ func (t *Task) Start(ctx context.Context) error {
t.pid = int(r.Pid)
if !hasCgroup {
cg, err := cgroups.Load(cgroups.V1, cgroups.PidPath(t.pid))
if err != nil {
if err != nil && err != cgroups.ErrCgroupDeleted {
return err
}
t.mu.Lock()
t.cg = cg
if err == cgroups.ErrCgroupDeleted {
t.cg = nil
} else {
t.cg = cg
}
t.mu.Unlock()
}
t.events.Publish(ctx, runtime.TaskStartEventTopic, &eventstypes.TaskStart{