Skip to content

Commit

Permalink
runtime/v1/linux: ignore ErrCgroupDeleted in Task.Start
Browse files Browse the repository at this point in the history
Fix a Rootless Docker-in-Docker issue on Fedora 30: docker-library/docker#165 (comment)
Related: containerd#1598

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit fab016c)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Jul 18, 2019
1 parent 18100a3 commit 227ebf3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions runtime/v1/linux/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 227ebf3

Please sign in to comment.