Set timestamps to nanosecond.
CRI requires all timestamps in nanosends instead of seconds. Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
This commit is contained in:
parent
02ec8754f5
commit
bbfcf62a0f
2 changed files with 9 additions and 9 deletions
|
@ -454,7 +454,7 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
|
|||
}
|
||||
|
||||
cState := s.runtime.ContainerStatus(podInfraContainer)
|
||||
created := cState.Created.Unix()
|
||||
created := cState.Created.UnixNano()
|
||||
|
||||
netNsPath, err := podInfraContainer.NetNsPath()
|
||||
if err != nil {
|
||||
|
@ -545,7 +545,7 @@ func (s *Server) ListPodSandbox(ctx context.Context, req *pb.ListPodSandboxReque
|
|||
return nil, err
|
||||
}
|
||||
cState := s.runtime.ContainerStatus(podInfraContainer)
|
||||
created := cState.Created.Unix()
|
||||
created := cState.Created.UnixNano()
|
||||
rStatus := pb.PodSandBoxState_NOTREADY
|
||||
if cState.Status == oci.ContainerStateRunning {
|
||||
rStatus = pb.PodSandBoxState_READY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue