4 Commits

Author SHA1 Message Date
56a65cffac generate systemd: support pods and geneartig files
Support generating systemd unit files for a pod.  Podman generates one
unit file for the pod including the PID file for the infra container's
conmon process and one unit file for each container (excluding the infra
container).

Note that this change implies refactorings in the `pkg/systemdgen` API.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-21 17:28:30 +02:00
2bfade4391 Do not hardcode podman binary location in generate systemd.
It is not correct to rely on specific location of the podman binary.
In most cases it is /usr/bin/podman, but sometimes is not (e.g. in
system tests). Use /proc/self/exe instead of hardcoded path.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-07 11:20:41 +03:00
a54429cf87 Use conmon pidfile in generated systemd unit as PIDFile.
By default, podman points PIDFile in generated unit file to non-existent
location. As a result, the unit file, generated by podman, is broken:
an attempt to start this unit without prior modification results in a crash,
because systemd can not find the pidfile of service's main process.

Fix the value of "PIDFile" and add a system test for this case.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-07-04 03:58:37 +03:00
faf499cf94 add unit tests for generate systemd
it looks like i forgot to add the unit tests for generate systemd

Signed-off-by: baude <bbaude@redhat.com>
2019-05-06 09:14:10 -05:00