spiegel_podman/pkg/systemd/quadlet
Valentin Rothberg 7c54d14232 quadlet: add ExecStop
Remove the container in ExecStop to make sure that Quadlet's adheres to
Podman's customizable stop signal/timeout.  Certain programs ignore
SIGTERM which renders the services generated by Quadlet less user
friendly compared to the ones from podman-generate-systemd.

Previously, `systemctl stop` would just hang until systemd's stop
timeout is hit.  Since `podman rm` also removes the CID file, the
additional `rm` can be removed.  Note that `podman rm` will return
immediately if the specified CID file isn't present.

I am working on a short tutorial on Quadlet and hit the issue with a
simple container running `sleep`.  `sleep` ignores SIGTERM and stopping
the service would take forever even with `PodmanArgs=--stop-timeout=0`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-13 15:21:48 +01:00
..
podmancmdline.go quadlet: Handle booleans that have defaults better 2022-12-20 11:00:48 +01:00
quadlet.go quadlet: add ExecStop 2023-02-13 15:21:48 +01:00
quadlet_test.go move quadlet packages into pkg/systemd 2022-10-19 13:38:27 +02:00