Skip to content

Commit fab016c

Browse files
committed
runtime/v1/linux: ignore ErrCgroupDeleted in Task.Start
Fix a Rootless Docker-in-Docker issue on Fedora 30: docker-library/docker#165 (comment) Related: containerd#1598 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 36e4c8e commit fab016c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

runtime/v1/linux/task.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,15 @@ func (t *Task) Start(ctx context.Context) error {
124124
t.pid = int(r.Pid)
125125
if !hasCgroup {
126126
cg, err := cgroups.Load(cgroups.V1, cgroups.PidPath(t.pid))
127-
if err != nil {
127+
if err != nil && err != cgroups.ErrCgroupDeleted {
128128
return err
129129
}
130130
t.mu.Lock()
131-
t.cg = cg
131+
if err == cgroups.ErrCgroupDeleted {
132+
t.cg = nil
133+
} else {
134+
t.cg = cg
135+
}
132136
t.mu.Unlock()
133137
}
134138
t.events.Publish(ctx, runtime.TaskStartEventTopic, &eventstypes.TaskStart{

0 commit comments

Comments
 (0)