Fixes containerd-shim-runhcs Delete on exec id
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
parent
84aa0bfde6
commit
83437ef646
@ -486,14 +486,16 @@ func (s *service) Delete(ctx context.Context, r *taskAPI.DeleteRequest) (*taskAP
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a container
|
||||||
|
if p.cid == p.id {
|
||||||
rhs := newRunhcs(p.bundle)
|
rhs := newRunhcs(p.bundle)
|
||||||
|
|
||||||
dopts := &runhcs.DeleteOpts{
|
dopts := &runhcs.DeleteOpts{
|
||||||
Force: true,
|
Force: true,
|
||||||
}
|
}
|
||||||
if err := rhs.Delete(ctx, p.id, dopts); err != nil {
|
if err := rhs.Delete(ctx, p.id, dopts); err != nil {
|
||||||
return nil, errors.Wrapf(err, "failed to delete container: %s", p.id)
|
return nil, errors.Wrapf(err, "failed to delete container: %s", p.id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
|
Loading…
Reference in New Issue
Block a user