Skip to content

Commit

Permalink
runtime: report finish time in containers stats
Browse files Browse the repository at this point in the history
Make sure we report the exit time for the container when we answer a "Status" request.

Fixes: #2096

Signed-off-by: Julien Ropé <jrope@redhat.com>
  • Loading branch information
littlejawa committed Jun 23, 2021
1 parent c0cc6d5 commit 6a1a051
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime/containerd-shim-v2/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ func (s *service) State(ctx context.Context, r *taskAPI.StateRequest) (_ *taskAP
Stderr: c.stderr,
Terminal: c.terminal,
ExitStatus: c.exit,
ExitedAt: c.exitTime,
}, nil
}

Expand All @@ -642,6 +643,7 @@ func (s *service) State(ctx context.Context, r *taskAPI.StateRequest) (_ *taskAP
Stderr: execs.tty.stderr,
Terminal: execs.tty.terminal,
ExitStatus: uint32(execs.exitCode),
ExitedAt: execs.exitTime,
}, nil
}

Expand Down

0 comments on commit 6a1a051

Please sign in to comment.