diff --git a/server/sandbox_run_linux.go b/server/sandbox_run_linux.go index 9610e07dfe1..ac43972efea 100644 --- a/server/sandbox_run_linux.go +++ b/server/sandbox_run_linux.go @@ -542,7 +542,7 @@ func (s *Server) runPodSandbox(ctx context.Context, req *types.RunPodSandboxRequ if strings.Contains(err2.Error(), noSuchID) { return nil } - log.Warnf(ctx, "Could not delete ctr id %s from idIndex", sbox.ID()) + log.Warnf(ctx, "Could not delete ctr id %s from idIndex: %v", sbox.ID(), err2) } return err2 }) @@ -654,7 +654,10 @@ func (s *Server) runPodSandbox(ctx context.Context, req *types.RunPodSandboxRequ log.Infof(ctx, description) err := s.PodIDIndex().Delete(sbox.ID()) if err != nil { - log.Warnf(ctx, "Could not delete pod id %s from idIndex", sbox.ID()) + if strings.Contains(err.Error(), noSuchID) { + return nil + } + log.Warnf(ctx, "Could not delete pod id %s from idIndex: %v", sbox.ID(), err) } return err })