Merge pull request #6571 from fuweid/fix-6402-for-runc.v1
This commit is contained in:
commit
d128c3767b
@ -259,9 +259,16 @@ func (s *service) Cleanup(ctx context.Context) (*taskAPI.DeleteResponse, error)
|
|||||||
if err := mount.UnmountAll(filepath.Join(path, "rootfs"), 0); err != nil {
|
if err := mount.UnmountAll(filepath.Join(path, "rootfs"), 0); err != nil {
|
||||||
logrus.WithError(err).Warn("failed to cleanup rootfs mount")
|
logrus.WithError(err).Warn("failed to cleanup rootfs mount")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pid, err := runcC.ReadPidFile(filepath.Join(path, process.InitPidFile))
|
||||||
|
if err != nil {
|
||||||
|
logrus.WithError(err).Warn("failed to read init pid file")
|
||||||
|
}
|
||||||
|
|
||||||
return &taskAPI.DeleteResponse{
|
return &taskAPI.DeleteResponse{
|
||||||
ExitedAt: time.Now(),
|
ExitedAt: time.Now(),
|
||||||
ExitStatus: 128 + uint32(unix.SIGKILL),
|
ExitStatus: 128 + uint32(unix.SIGKILL),
|
||||||
|
Pid: uint32(pid),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user