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

@@ -152,7 +152,7 @@ func (s *shim) Delete(ctx context.Context) (*runtime.Exit, error) {
response, err := s.task.Delete(ctx, &task.DeleteRequest{
ID: s.ID(),
})
if err != nil {
if err != nil && errdefs.IsNotFound(err) {
return nil, errdefs.FromGRPC(err)
}
if err := s.waitShutdown(ctx); err != nil {