podman/pkg/systemd
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
..
define generate systemd: handle --restart 2021-09-07 13:58:11 +02:00
generate Fix language. Mostly spelling a -> an 2022-11-20 19:41:06 +01:00
notifyproxy kube sdnotify: run proxies for the lifespan of the service 2022-12-06 14:15:11 +01:00
parser quadlet: Rename parser.LookupBoolean to LookupBooleanWithDefault 2022-12-20 10:38:49 +01:00
quadlet quadlet: add ExecStop 2023-02-13 15:21:48 +01:00
activation.go pkg/systemd: don't require LISTEN_FDNAMES for socket activation 2021-06-24 09:01:39 -06:00
activation_test.go pkg/systemd: don't require LISTEN_FDNAMES for socket activation 2021-06-24 09:01:39 -06:00
dbus.go Eval symlinks on XDG_RUNTIME_DIR 2022-10-28 14:32:39 -04:00