Skip to content

Commit

Permalink
PR: .Wrapf( to .Wrap(
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza El-Saawy <[email protected]>
  • Loading branch information
helsaawy committed Feb 1, 2022
1 parent 2b7d978 commit b846a9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/containerd-shim-runhcs-v1/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,16 @@ func (p *pod) KillTask(ctx context.Context, tid, eid string, signal uint32, all
func (p *pod) DeleteTask(ctx context.Context, tid string) error {
t, err := p.GetTask(tid)
if err != nil {
return errors.Wrapf(err, "could not find task to delete")
return errors.Wrap(err, "could not delete task")
}

// although deleting the sandbox task is a no-op, still check that it is not running
e, err := t.GetExec("")
if err != nil {
return errors.Wrapf(err, "could not get initial exec")
return errors.Wrap(err, "could not get initial exec")
}
if e.State() == shimExecStateRunning {
return errors.Wrapf(errdefs.ErrFailedPrecondition, "cannot delete task with running exec")
return errors.Wrap(errdefs.ErrFailedPrecondition, "cannot delete task with running exec")
}

if p.id != tid {
Expand Down

0 comments on commit b846a9a

Please sign in to comment.