Refactor process.go for platform specific
Signed-off-by: John Howard <jhoward@microsoft.com> Move process sorter to new file Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Sort containers by id This will not be the most accurate sorting but atleast the list will be consistent inbetween calls. Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Allow runtime to be configurable via daemon start This allows people to pass an alternate name or location to the runtime binary to start containers. Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Fix state output for containers Return the proper state/status for a container by checking if the pid is still alive. Also fix the cleanup handling in the shim to make sure containers are not left behind. Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Properly wait for container start Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
0ad7654f80
commit
b044ff0f29
19 changed files with 323 additions and 206 deletions
|
@ -17,9 +17,19 @@ func (s *Supervisor) exit(t *ExitTask) error {
|
|||
proc := t.Process
|
||||
status, err := proc.ExitStatus()
|
||||
if err != nil {
|
||||
logrus.WithField("error", err).Error("containerd: get exit status")
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"error": err,
|
||||
"pid": proc.ID(),
|
||||
"id": proc.Container().ID(),
|
||||
"systemPid": proc.SystemPid(),
|
||||
}).Error("containerd: get exit status")
|
||||
}
|
||||
logrus.WithFields(logrus.Fields{"pid": proc.ID(), "status": status}).Debug("containerd: process exited")
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"pid": proc.ID(),
|
||||
"status": status,
|
||||
"id": proc.Container().ID(),
|
||||
"systemPid": proc.SystemPid(),
|
||||
}).Debug("containerd: process exited")
|
||||
|
||||
// if the process is the the init process of the container then
|
||||
// fire a separate event for this process
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue