summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-10 12:01:45 +0200
committerGitHub <noreply@github.com>2019-08-10 12:01:45 +0200
commit8c77dd77af6852d1980949730663fc6814aacbdf (patch)
tree4876840fa141dd1a17bfb50e66103ea0e234318d /libpod/runtime_ctr.go
parentd65cb664379117de527aeb253f1d4230998d2939 (diff)
parent0c9a941d01b26c94050bf9195f2d0611424a2c70 (diff)
downloadpodman-8c77dd77af6852d1980949730663fc6814aacbdf.tar.gz
podman-8c77dd77af6852d1980949730663fc6814aacbdf.tar.bz2
podman-8c77dd77af6852d1980949730663fc6814aacbdf.zip
Merge pull request #3742 from adrianreber/ConmonPidFile
Conmon pid file
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 61a871b28..92b2faefb 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -54,6 +54,14 @@ func (r *Runtime) RestoreContainer(ctx context.Context, rSpec *spec.Spec, config
}
// For an imported checkpoint no one has ever set the StartedTime. Set it now.
ctr.state.StartedTime = time.Now()
+
+ // If the path to ConmonPidFile starts with the default value (RunRoot), then
+ // the user has not specified '--conmon-pidfile' during run or create (probably).
+ // In that case reset ConmonPidFile to be set to the default value later.
+ if strings.HasPrefix(ctr.config.ConmonPidFile, r.config.StorageConfig.RunRoot) {
+ ctr.config.ConmonPidFile = ""
+ }
+
return r.setupContainer(ctx, ctr)
}