Description of problem: I've been working on setting up health checks for our podman containers and have followed the instructions on this page: https://www.redhat.com/sysadmin/podman-edge-healthcheck It's mentioned that one of the --health-on-failure= options is restart so I tried it rather than kill which is given in the example. However, it never appears to restart the container when the current one is set to unhealthy, is this a bug OR am I not using the option correctly? $ podman run --replace -d --name test-container --health-cmd /healthcheck --health-on-failure=restart --health-retries=1 health-check-action Version-Release number of selected component (if applicable): podman version 4.3.1 How reproducible: See the issue here for more details. https://github.com/containers/podman/issues/17777 Steps to Reproduce: 1. As per example script & output in above issue. 2. 3. Actual results: Container was stopped and then exited. Expected results: Container should've restarted once the health command returned <> 0 Additional info: Have worked with https://github.com/vrothberg to reproduce the error and he asked me to raise a bugzilla case. Fix has been created: https://github.com/containers/podman/pull/17830
Thanks for opening the issue, Gary! As you pointed out, we are working on a solution in https://github.com/containers/podman/pull/17830 and will keep you posted.
A fix has been backported to the Podman 4.4 branch: https://github.com/containers/podman/pull/17862 It will be shipped with the upcoming Podman 4.4.3 release which is scheduled for tomorrow. I also prepared backports for Podman 4.4.1 and 4.3.1 in RHEL.
Closing. v4.4.3 and higher have been shipped in fedora.