Return NotFound error for kill and delete in deleted state.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-04-26 14:36:40 -07:00
parent 3a3f0aac88
commit dff7456804
3 changed files with 5 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ func (t *Task) Namespace() string {
// Delete the task and return the exit status
func (t *Task) Delete(ctx context.Context) (*runtime.Exit, error) {
rsp, err := t.shim.Delete(ctx, empty)
if err != nil {
if err != nil && !errdefs.IsNotFound(err) {
return nil, errdefs.FromGRPC(err)
}
t.tasks.Delete(ctx, t.id)