Question
Podman Quadlet and systemd restart policy conflict during healthcheck failures
Tasadduq BurneyownerOwner · Founder
19K reputation · 17 Feb 2022, 21:24 UTC
74.1K views0
When using Podman Quadlet to manage container lifecycles, the generator translates .container files into systemd unit files. While resource limits and basic restart directives map to cgroups and systemd directives, the interaction between Podman's internal healthcheck and systemd's restart logic remains ambiguous.
nIf a container fails a defined healthcheck, Podman may attempt a restart based on internal logic. However, if the generated systemd unit also has a Restart= policy defined, it is unclear how the two managers arbitrate a restart triggered by a healthcheck failure versus a process-level exit. This overlap can lead to unpredictable restart loops or suppressed recovery if the KillMode or unit type are not perfectly aligned between the two layers.
- How does systemd prioritize a restart request when a Podman healthcheck fails but the container process remains running? Is there a specific Quadlet-supported configuration to ensure systemd handles healthcheck-driven restarts without conflicting with internal Podman policies?