mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +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:
@ -94,5 +94,8 @@ func createPodOptions(p *specgen.PodSpecGenerator) ([]libpod.PodCreateOption, er
|
||||
}
|
||||
options = append(options, libpod.WithPodCgroups())
|
||||
options = append(options, libpod.WithPodCreateCommand())
|
||||
if len(p.InfraConmonPidFile) > 0 {
|
||||
options = append(options, libpod.WithInfraConmonPidFile(p.InfraConmonPidFile))
|
||||
}
|
||||
return options, nil
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ type PodBasicConfig struct {
|
||||
// InfraCommand and InfraImages in this struct.
|
||||
// Optional.
|
||||
NoInfra bool `json:"no_infra,omitempty"`
|
||||
// InfraConmonPidFile is a custom path to store the infra container's
|
||||
// conmon PID.
|
||||
InfraConmonPidFile string `json:"infra_conmon_pid_file,omitempty"`
|
||||
// InfraCommand sets the command that will be used to start the infra
|
||||
// container.
|
||||
// If not set, the default set in the Libpod configuration file will be
|
||||
|
Reference in New Issue
Block a user