Skip to content

Commit

Permalink
Use CurrentContainerStatus in list CRI calls
Browse files Browse the repository at this point in the history
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
  • Loading branch information
mrunalp committed Oct 24, 2018
1 parent a1fb0fc commit 21bd8cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/container_list.go
Expand Up @@ -90,7 +90,7 @@ func (s *Server) ListContainers(ctx context.Context, req *pb.ListContainersReque
continue
}
podSandboxID := ctr.Sandbox()
cState := s.Runtime().ContainerStatus(ctr)
cState := s.Runtime().CurrentContainerStatus(ctr)
created := ctr.CreatedAt().UnixNano()
rState := pb.ContainerState_CONTAINER_UNKNOWN
cID := ctr.ID()
Expand Down
2 changes: 1 addition & 1 deletion server/sandbox_list.go
Expand Up @@ -74,7 +74,7 @@ func (s *Server) ListPodSandbox(ctx context.Context, req *pb.ListPodSandboxReque
// it's better not to panic
continue
}
cState := s.Runtime().ContainerStatus(podInfraContainer)
cState := s.Runtime().CurrentContainerStatus(podInfraContainer)
rStatus := pb.PodSandboxState_SANDBOX_NOTREADY
if cState.Status == oci.ContainerStateRunning {
rStatus = pb.PodSandboxState_SANDBOX_READY
Expand Down

0 comments on commit 21bd8cf

Please sign in to comment.