podman icon indicating copy to clipboard operation
podman copied to clipboard

Add a run counter to healthcheck unit names

Open mheon opened this issue 2 months ago • 5 comments

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.

mheon avatar May 03 '24 13:05 mheon