summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-12-19 18:06:12 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-12-21 09:46:05 +0100
commitf65eafa6ba2fec491185ccf29a515c9a96b9852a (patch)
tree15f6bcafc32a5918258cf2bb1164e44f5d08f412
parentfa998f224fb7aa15d85b09dfdc4491dc09c9e390 (diff)
downloadpodman-f65eafa6ba2fec491185ccf29a515c9a96b9852a.tar.gz
podman-f65eafa6ba2fec491185ccf29a515c9a96b9852a.tar.bz2
podman-f65eafa6ba2fec491185ccf29a515c9a96b9852a.zip
libpod: always store the conmon pid file
we need this information to later be able to join the conmon process. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--libpod/runtime_ctr.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index ba8eaacbe..c108febd7 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -8,6 +8,7 @@ import (
"strings"
"time"
+ "github.com/containers/libpod/pkg/rootless"
"github.com/containers/storage"
"github.com/containers/storage/pkg/stringid"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -154,6 +155,10 @@ func (r *Runtime) newContainer(ctx context.Context, rSpec *spec.Spec, options ..
}
}()
+ if rootless.IsRootless() && ctr.config.ConmonPidFile == "" {
+ ctr.config.ConmonPidFile = filepath.Join(ctr.state.RunDir, "conmon.pid")
+ }
+
// Go through the volume mounts and check for named volumes
// If the named volme already exists continue, otherwise create
// the storage for the named volume.