Descriptiongary.revell@oracle.com
2023-03-17 14:18:32 UTC
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
Comment 1Valentin Rothberg
2023-03-17 16:11:52 UTC
Comment 3Valentin Rothberg
2023-03-21 11:51:46 UTC
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.