runtime: report finish time in containers stats

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>
This commit is contained in:
Julien Ropé 2021-06-23 17:25:30 +02:00
parent c0cc6d5978
commit 6a1a051c65

View File

@ -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
}
@ -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
}