@@ -12,10 +12,12 @@ func (s *ServerRPC) ContainerCreate(ctx context.Context, req *types.ContainerCre
1212
1313 containerID , err := s .daemon .CreateContainerInPod (req .PodID , req .ContainerSpec )
1414 if err != nil {
15- glog .Errorf ("CreateContainerInPod failed: %v" , err )
15+ glog .Errorf ("ContainerCreate failed %v with request %s : %v" , err , req . String () )
1616 return nil , err
1717 }
1818
19+ glog .V (3 ).Infof ("ContainerCreate done with request %s" , req .String ())
20+
1921 return & types.ContainerCreateResponse {
2022 ContainerID : containerID ,
2123 }, nil
@@ -25,9 +27,10 @@ func (s *ServerRPC) ContainerStart(ctx context.Context, req *types.ContainerStar
2527 glog .V (3 ).Info ("ContainerStart with request %s" , req .String ())
2628 err := s .daemon .StartContainer (req .ContainerId )
2729 if err != nil {
28- glog .Errorf ("ContainerStart failed: %v" , err )
30+ glog .Errorf ("ContainerStart failed %v with request %s " , err , req . String () )
2931 return nil , err
3032 }
33+ glog .V (3 ).Info ("ContainerStart done with request %s" , req .String ())
3134 return & types.ContainerStartResponse {}, nil
3235}
3336
@@ -37,10 +40,12 @@ func (s *ServerRPC) ContainerStop(c context.Context, req *types.ContainerStopReq
3740
3841 err := s .daemon .StopContainer (req .ContainerID , int (req .Timeout ))
3942 if err != nil {
40- glog .Errorf ("ContainerStop error: %v" , err )
43+ glog .Errorf ("ContainerStop failed %v with request %v " , err , req . String () )
4144 return nil , err
4245 }
4346
47+ glog .V (3 ).Infof ("ContainerStop done with request %v" , req .String ())
48+
4449 return & types.ContainerStopResponse {}, nil
4550}
4651
@@ -50,20 +55,23 @@ func (s *ServerRPC) ContainerRename(c context.Context, req *types.ContainerRenam
5055
5156 err := s .daemon .ContainerRename (req .OldContainerName , req .NewContainerName )
5257 if err != nil {
53- glog .Errorf ("ContainerRename error: %v" , err )
58+ glog .Errorf ("ContainerRename failed %v with request %v " , err , req . String () )
5459 return nil , err
5560 }
5661
62+ glog .V (3 ).Infof ("ContainerRename done with request %v" , req .String ())
63+
5764 return & types.ContainerRenameResponse {}, nil
5865}
5966
6067func (s * ServerRPC ) ContainerRemove (ctx context.Context , req * types.ContainerRemoveRequest ) (* types.ContainerRemoveResponse , error ) {
6168 glog .V (3 ).Info ("ContainerRemove with request %s" , req .String ())
6269 err := s .daemon .RemoveContainer (req .ContainerId )
6370 if err != nil {
64- glog .Errorf ("ContainerRemove failed: %v" , err )
71+ glog .Errorf ("ContainerRemove failed %v with request %s " , err , req . String () )
6572 return nil , err
6673 }
74+ glog .V (3 ).Info ("ContainerRemove done with request %s" , req .String ())
6775 return & types.ContainerRemoveResponse {}, nil
6876}
6977
@@ -73,9 +81,10 @@ func (s *ServerRPC) ContainerSignal(ctx context.Context, req *types.ContainerSig
7381
7482 err := s .daemon .KillPodContainers (req .PodID , req .ContainerID , req .Signal )
7583 if err != nil {
76- glog .Errorf ("Kill Container %s of Pod %s with signal %d failed: %v " , req . ContainerID , req .PodID , req . Signal , err )
84+ glog .Errorf ("ContainerSignal failed %v done with request %s " , err , req .String () )
7785 return nil , err
7886 }
7987
88+ glog .V (3 ).Infof ("ContainerSignal done with request %s" , req .String ())
8089 return & types.ContainerSignalResponse {}, nil
8190}
0 commit comments