podman
podman copied to clipboard
Add a run counter to healthcheck unit names
Systemd dislikes it when we rapidly create and remove a transient unit. Solution: If we change the name every time, it's different enough that systemd is satisfied and we stop having errors trying to restart the healthcheck.
Do this by maintaining a count of how many times we've run the healthcheck, and appending that counter to the end of the unit name. The counter increments every time we destroy the previous healthcheck.
Should resolve RHEL-26105
Does this PR introduce a user-facing change?
Fixed a bug where rapidly-restarting containers with healthchecks could sometimes fail to start their healthchecks after restarting.