Save exit file for container in persistent directory
conmon will save the exit file of the container under
/var/lib so it gets persisted and available even on reboot.
@@ -98,6 +98,7 @@ func (r *runtimeOCI) CreateContainer(c *Container, cgroupParent string) (err err
"-u", c.id,
"-r", r.path,
"-b", c.bundlePath,
+ "--persist-dir", c.dir,
"-p", filepath.Join(c.bundlePath, "pidfile"),
"-P", c.conmonPidFilePath(),
"-l", c.logPath,
@@ -657,7 +658,7 @@ func (r *runtimeOCI) UpdateContainerStatus(c *Container) error {
}
if c.state.Status == ContainerStateStopped {
- exitFilePath := filepath.Join(r.config.ContainerExitsDir, c.id)
+ exitFilePath := filepath.Join(c.dir, "exit")
var fi os.FileInfo
err = kwait.ExponentialBackoff(
kwait.Backoff{
