diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-05-29 13:20:22 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-11 11:01:13 +0200 |
commit | 402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6 (patch) | |
tree | ae60cd4ffc1e50a88740b888d4d8d6d0bb5e530e /libpod/runtime_pod_infra_linux.go | |
parent | 144c6bb76d7652f53167d4bc7130cf897f5903a1 (diff) | |
download | podman-402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6.tar.gz podman-402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6.tar.bz2 podman-402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6.zip |
pod create: add `--infra-conmon-pidfile`
Add an `--infra-conmon-pidfile` flag to `podman-pod-create` to write the
infra container's conmon process ID to a specified path. Several
container sub-commands already support `--conmon-pidfile` which is
especially helpful to allow for systemd to access and track the conmon
processes. This allows for easily tracking the conmon process of a
pod's infra container.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/runtime_pod_infra_linux.go')
-rw-r--r-- | libpod/runtime_pod_infra_linux.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go index 06a7b3936..a0dee3aa1 100644 --- a/libpod/runtime_pod_infra_linux.go +++ b/libpod/runtime_pod_infra_linux.go @@ -130,6 +130,9 @@ func (r *Runtime) makeInfraContainer(ctx context.Context, p *Pod, imgName, rawIm options = append(options, WithRootFSFromImage(imgID, imgName, rawImageName)) options = append(options, WithName(containerName)) options = append(options, withIsInfra()) + if len(p.config.InfraContainer.ConmonPidFile) > 0 { + options = append(options, WithConmonPidFile(p.config.InfraContainer.ConmonPidFile)) + } return r.newContainer(ctx, g.Config, options...) } |