From 5ac5c94822e2712004444670dbe229b7b74d6d4b Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Mon, 22 May 2017 16:38:10 +0200 Subject: [PATCH] server: sandbox_remove: add comment on sandbox not found empty response Signed-off-by: Antonio Murdaca --- server/sandbox_remove.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/sandbox_remove.go b/server/sandbox_remove.go index b4a5b66e..6f23b9ed 100644 --- a/server/sandbox_remove.go +++ b/server/sandbox_remove.go @@ -21,6 +21,10 @@ func (s *Server) RemovePodSandbox(ctx context.Context, req *pb.RemovePodSandboxR return nil, err } + // If the sandbox isn't found we just return an empty response to adhere + // the the CRI interface which expects to not error out in not found + // cases. + resp := &pb.RemovePodSandboxResponse{} logrus.Warnf("could not get sandbox %s, it's probably been removed already: %v", req.PodSandboxId, err) return resp, nil