mirror of
https://github.com/containers/podman.git
synced 2025-06-18 07:28:57 +08:00
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>
This commit is contained in:
@ -193,4 +193,23 @@ var _ = Describe("Podman pod start", func() {
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(20)) // 10*(infra+top)
|
||||
})
|
||||
|
||||
It("podman pod create --infra-conmon-pod create + start", func() {
|
||||
tmpDir, err := ioutil.TempDir("", "")
|
||||
Expect(err).To(BeNil())
|
||||
tmpFile := tmpDir + "podID"
|
||||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
podName := "rudolph"
|
||||
// Create a pod with --infra-conmon-pid.
|
||||
session := podmanTest.Podman([]string{"pod", "create", "--name", podName, "--infra-conmon-pidfile", tmpFile})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"pod", "start", podName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1)) // infra
|
||||
})
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user