containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.77k stars 2.42k forks source link

quadlet: add Container-spec StopSignal mapping to podman --stop-signal #23050

Closed tsutsu closed 3 months ago

tsutsu commented 4 months ago

Feature request description

Using a quadlet .container unit, I want to set the stop signal for the created container.

(I have a third-party container image for a workload that ignores SIGTERM, instead only responding to SIGINT. The container image was additionally not configured with a STOPSIGNAL when built. So I need to somehow get the container unit to pass --stop-signal to podman run.)

Suggest potential solution

Just as systemd service units have StopSignal in the [Service] section, I would expect quadlet container units to support StopSignal in the [Container] section, translating it to podman --stop-signal.

Have you considered any alternatives?

I am currently using PodmanArgs=--stop-signal=SIGINT to pass the flag directly. (But it took me sleeping on the problem to even realize I could do that.)

ygalblum commented 4 months ago

Hi @tsutsu thanks for opening this issue. As you discovered, the PodmanArgs key was added for these exact cases, i.e. when the specific key is not supported. Care to open a PR to add the support for the StopSignal key?

github-actions[bot] commented 3 months ago

A friendly reminder that this issue had no activity for 30 days.