Skip to content

Commit

Permalink
Merge pull request cri-o#6409 from laxmanvallandas/release-1.23
Browse files Browse the repository at this point in the history
[1.23] crio:fix a bug about log container
  • Loading branch information
openshift-merge-robot authored Jan 3, 2023
2 parents 8240333 + be5c64c commit 2ff6a26
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/container_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,16 @@ func (s *Server) ContainerStatus(ctx context.Context, req *types.ContainerStatus
cState = c.State()
}

created := c.CreatedAt().UnixNano()
resp.Status.CreatedAt = c.CreatedAt().UnixNano()
switch cState.Status {
case oci.ContainerStateCreated:
rStatus = types.ContainerState_CONTAINER_CREATED
resp.Status.CreatedAt = created
case oci.ContainerStateRunning:
rStatus = types.ContainerState_CONTAINER_RUNNING
resp.Status.CreatedAt = created
started := cState.Started.UnixNano()
resp.Status.StartedAt = started
case oci.ContainerStateStopped:
rStatus = types.ContainerState_CONTAINER_EXITED
resp.Status.CreatedAt = created
started := cState.Started.UnixNano()
resp.Status.StartedAt = started
finished := cState.Finished.UnixNano()
Expand Down

0 comments on commit 2ff6a26

Please sign in to comment.