aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-10 09:13:55 -0400
committerGitHub <noreply@github.com>2021-05-10 09:13:55 -0400
commit5a8b3cf835742b3ba3bdc79010737ae3e2c69ce3 (patch)
tree53e951d1f3c6f1d87c2d14d8907cbc33cf29a23b
parent195895eb7e1924b7dcf049ca5067f35795f74595 (diff)
parent157459a638c5f3eebd8904d962c13344b0ef83da (diff)
downloadpodman-5a8b3cf835742b3ba3bdc79010737ae3e2c69ce3.tar.gz
podman-5a8b3cf835742b3ba3bdc79010737ae3e2c69ce3.tar.bz2
podman-5a8b3cf835742b3ba3bdc79010737ae3e2c69ce3.zip
Merge pull request #10288 from Luap99/fix-10274
fix container startup for empty pidfile
-rw-r--r--libpod/oci_conmon_linux.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 1b1d4ad59..3da49b85f 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -1016,7 +1016,12 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
}
}
- args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), ctr.config.PidFile, ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag)
+ pidfile := ctr.config.PidFile
+ if pidfile == "" {
+ pidfile = filepath.Join(ctr.state.RunDir, "pidfile")
+ }
+
+ args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), pidfile, ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag)
if ctr.config.Spec.Process.Terminal {
args = append(args, "-t")