From 908b3fcbbc4539135c57cb5609db71f09c5d1c53 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Thu, 17 Aug 2017 14:27:29 -0700 Subject: [PATCH] Add container/sandbox id to response debugs Signed-off-by: Mrunal Patel --- server/container_stop.go | 2 +- server/sandbox_stop.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/container_stop.go b/server/container_stop.go index 9a528f61..d1b9a8e7 100644 --- a/server/container_stop.go +++ b/server/container_stop.go @@ -30,6 +30,6 @@ func (s *Server) StopContainer(ctx context.Context, req *pb.StopContainerRequest s.ContainerStateToDisk(c) resp := &pb.StopContainerResponse{} - logrus.Debugf("StopContainerResponse: %+v", resp) + logrus.Debugf("StopContainerResponse %s: %+v", c.ID(), resp) return resp, nil } diff --git a/server/sandbox_stop.go b/server/sandbox_stop.go index 2332c6cc..b4d7f02b 100644 --- a/server/sandbox_stop.go +++ b/server/sandbox_stop.go @@ -34,11 +34,14 @@ func (s *Server) StopPodSandbox(ctx context.Context, req *pb.StopPodSandboxReque resp := &pb.StopPodSandboxResponse{} logrus.Warnf("could not get sandbox %s, it's probably been stopped already: %v", req.PodSandboxId, err) + logrus.Debugf("StopPodSandboxResponse %s: %+v", req.PodSandboxId, resp) return resp, nil } if sb.Stopped() { - return &pb.StopPodSandboxResponse{}, nil + resp := &pb.StopPodSandboxResponse{} + logrus.Debugf("StopPodSandboxResponse %s: %+v", sb.ID(), resp) + return resp, nil } podInfraContainer := sb.InfraContainer() @@ -116,7 +119,7 @@ func (s *Server) StopPodSandbox(ctx context.Context, req *pb.StopPodSandboxReque sb.SetStopped() resp := &pb.StopPodSandboxResponse{} - logrus.Debugf("StopPodSandboxResponse: %+v", resp) + logrus.Debugf("StopPodSandboxResponse %s: %+v", sb.ID(), resp) return resp, nil }