summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_ctr.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 6290479a8..0acf88cbc 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -69,6 +69,13 @@ func (r *Runtime) RestoreContainer(ctx context.Context, rSpec *spec.Spec, config
ctr.config.ConmonPidFile = ""
}
+ // If the path to PidFile starts with the default value (RunRoot), then
+ // the user has not specified '--pidfile' during run or create (probably).
+ // In that case reset PidFile to be set to the default value later.
+ if strings.HasPrefix(ctr.config.PidFile, r.storageConfig.RunRoot) {
+ ctr.config.PidFile = ""
+ }
+
return r.setupContainer(ctx, ctr)
}