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>
This commit is contained in:
Giuseppe Scrivano
2018-12-19 18:06:12 +01:00
parent fa998f224f
commit f65eafa6ba

View File

@ -8,6 +8,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/containers/libpod/pkg/rootless"
"github.com/containers/storage" "github.com/containers/storage"
"github.com/containers/storage/pkg/stringid" "github.com/containers/storage/pkg/stringid"
spec "github.com/opencontainers/runtime-spec/specs-go" 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 // Go through the volume mounts and check for named volumes
// If the named volme already exists continue, otherwise create // If the named volme already exists continue, otherwise create
// the storage for the named volume. // the storage for the named volume.