Merge pull request #7787 from ginglis13/restore-fail
allow client to remove created tasks with PID 0
This commit is contained in:
commit
e5751d44c4
5
task.go
5
task.go
@ -311,6 +311,11 @@ func (t *task) Delete(ctx context.Context, opts ...ProcessDeleteOpts) (*ExitStat
|
||||
// On windows Created is akin to Stopped
|
||||
break
|
||||
}
|
||||
if t.pid == 0 {
|
||||
// allow for deletion of created tasks with PID 0
|
||||
// https://github.com/containerd/containerd/issues/7357
|
||||
break
|
||||
}
|
||||
fallthrough
|
||||
default:
|
||||
return nil, fmt.Errorf("task must be stopped before deletion: %s: %w", status.Status, errdefs.ErrFailedPrecondition)
|
||||
|
Loading…
Reference in New Issue
Block a user