server: return sandbox's own created time

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-05-11 11:00:55 +02:00
parent 80a789bce3
commit 59e3f98b6d
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9

View file

@ -21,7 +21,6 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
} }
cState := s.runtime.ContainerStatus(podInfraContainer) cState := s.runtime.ContainerStatus(podInfraContainer)
created := cState.Created.UnixNano()
netNsPath, err := podInfraContainer.NetNsPath() netNsPath, err := podInfraContainer.NetNsPath()
if err != nil { if err != nil {
@ -42,7 +41,7 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
resp := &pb.PodSandboxStatusResponse{ resp := &pb.PodSandboxStatusResponse{
Status: &pb.PodSandboxStatus{ Status: &pb.PodSandboxStatus{
Id: sandboxID, Id: sandboxID,
CreatedAt: created, CreatedAt: sb.created.UnixNano(),
Linux: &pb.LinuxPodSandboxStatus{ Linux: &pb.LinuxPodSandboxStatus{
Namespaces: &pb.Namespace{ Namespaces: &pb.Namespace{
Network: netNsPath, Network: netNsPath,