Skip to content

Commit

Permalink
Fixes containerd-shim-runhcs Delete on exec id
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
  • Loading branch information
jterry75 committed Sep 27, 2018
1 parent 84aa0bf commit 83437ef
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions runtime/v2/runhcs/service.go
Expand Up @@ -486,13 +486,15 @@ func (s *service) Delete(ctx context.Context, r *taskAPI.DeleteRequest) (*taskAP
return nil, err
}

rhs := newRunhcs(p.bundle)

dopts := &runhcs.DeleteOpts{
Force: true,
}
if err := rhs.Delete(ctx, p.id, dopts); err != nil {
return nil, errors.Wrapf(err, "failed to delete container: %s", p.id)
// This is a container
if p.cid == p.id {
rhs := newRunhcs(p.bundle)
dopts := &runhcs.DeleteOpts{
Force: true,
}
if err := rhs.Delete(ctx, p.id, dopts); err != nil {
return nil, errors.Wrapf(err, "failed to delete container: %s", p.id)
}
}

select {
Expand Down

0 comments on commit 83437ef

Please sign in to comment.