Skip to content

Commit

Permalink
Merge pull request #3253 from corhere/c8dexecutor-task-delete
Browse files Browse the repository at this point in the history
containerdexecutor: clean up task if Start() fails
  • Loading branch information
tonistiigi authored Nov 3, 2022
2 parents 14fa4f2 + f448313 commit 60c9d2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/containerdexecutor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (w *containerdExecutor) Run(ctx context.Context, id string, root executor.M
}

defer func() {
if _, err1 := task.Delete(context.TODO()); err == nil && err1 != nil {
if _, err1 := task.Delete(context.TODO(), containerd.WithProcessKill); err == nil && err1 != nil {
err = errors.Wrapf(err1, "failed to delete task %s", id)
}
}()
Expand Down

0 comments on commit 60c9d2c

Please sign in to comment.