Merge pull request #3419 from AkihiroSuda/fix-task-start
runtime/v1/linux: ignore ErrCgroupDeleted in Task.Start
This commit is contained in:
commit
063a4ff278
@ -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()
|
||||
if err == cgroups.ErrCgroupDeleted {
|
||||
t.cg = nil
|
||||
} else {
|
||||
t.cg = cg
|
||||
}
|
||||
t.mu.Unlock()
|
||||
}
|
||||
t.events.Publish(ctx, runtime.TaskStartEventTopic, &eventstypes.TaskStart{
|
||||
|
Loading…
Reference in New Issue
Block a user