Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When a container is unhealthy, podman healthcheck mechanism check healthcheck_cmd command for number_of_retries times then do the action mentioned in health-on-failure.
If we stopped container then tried again to start it, podman tries 1 time only if "FailingStreak" is equal or larger than the number_of_retries.
Version-Release number of selected component (if applicable):
Rhel 8.7
podman-4.2.0-4
How reproducible:
Always
Steps to Reproduce:
1) create container from any RHEL-based image with failing healthecheck
#podman create -t --restart "on-failure" --health-cmd "/usr/bin/sleep 2; /usr/bin/false;" --health-interval 30s --health-on-failure restart --health-retries 5 --health-timeout 20s --name testing_on_podman_2 5218 /bin/bash
2) Start container and wait for FailingStreak to be larger than health-retries (in this case 5)
# podman inspect testing_on_podman_2 --format {{.State.Health}}
{unhealthy 5 [{2022-11-21T13:14:56.263661799Z 2022-11-21T13:14:58.644395856Z 1 } {2022-11-21T13:15:29.210324494Z 2022-11-21T13:15:31.617566043Z 1 } {2022-11-21T13:16:02.472515722Z 2022-11-21T13:16:04.918606044Z 1 } {2022-11-21T13:16:35.690635907Z 2022-11-21T13:16:38.126636751Z 1 } {2022-11-21T13:17:08.734469375Z 2022-11-21T13:17:11.183019457Z 1 }]}
3) Stop container, and start it again.
4) Podman tries one time then container is stopped
# podman start testing_on_podman_2
testing_on_podman_2
# podman inspect testing_on_podman_2 --format {{.State.Health}}
{unhealthy 6 [{2022-11-21T13:15:29.210324494Z 2022-11-21T13:15:31.617566043Z 1 } {2022-11-21T13:16:02.472515722Z 2022-11-21T13:16:04.918606044Z 1 } {2022-11-21T13:16:35.690635907Z 2022-11-21T13:16:38.126636751Z 1 } {2022-11-21T13:17:08.734469375Z 2022-11-21T13:17:11.183019457Z 1 } {2022-11-21T13:17:38.165949695Z 2022-11-21T13:17:40.709216292Z 1 }]}
# podman inspect testing_on_podman_2 --format {{.State.Status}}
exited
The bug has been verified on podman-4.3.1-2.module+el8.8.0+17574+f7825c4b.x86_64.
[root@ibm-x3650m4-01-vm-11 podman]# rpm -q podman
podman-4.3.1-2.module+el8.8.0+17574+f7825c4b.x86_64
[root@ibm-x3650m4-01-vm-11 podman]# bats -f "podman healthcheck - restart cleans up old state" test/system/220-healthcheck.bats
220-healthcheck.bats
✓ podman healthcheck - restart cleans up old state
1 test, 0 failures
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2023:2758
Description of problem: When a container is unhealthy, podman healthcheck mechanism check healthcheck_cmd command for number_of_retries times then do the action mentioned in health-on-failure. If we stopped container then tried again to start it, podman tries 1 time only if "FailingStreak" is equal or larger than the number_of_retries. Version-Release number of selected component (if applicable): Rhel 8.7 podman-4.2.0-4 How reproducible: Always Steps to Reproduce: 1) create container from any RHEL-based image with failing healthecheck #podman create -t --restart "on-failure" --health-cmd "/usr/bin/sleep 2; /usr/bin/false;" --health-interval 30s --health-on-failure restart --health-retries 5 --health-timeout 20s --name testing_on_podman_2 5218 /bin/bash 2) Start container and wait for FailingStreak to be larger than health-retries (in this case 5) # podman inspect testing_on_podman_2 --format {{.State.Health}} {unhealthy 5 [{2022-11-21T13:14:56.263661799Z 2022-11-21T13:14:58.644395856Z 1 } {2022-11-21T13:15:29.210324494Z 2022-11-21T13:15:31.617566043Z 1 } {2022-11-21T13:16:02.472515722Z 2022-11-21T13:16:04.918606044Z 1 } {2022-11-21T13:16:35.690635907Z 2022-11-21T13:16:38.126636751Z 1 } {2022-11-21T13:17:08.734469375Z 2022-11-21T13:17:11.183019457Z 1 }]} 3) Stop container, and start it again. 4) Podman tries one time then container is stopped # podman start testing_on_podman_2 testing_on_podman_2 # podman inspect testing_on_podman_2 --format {{.State.Health}} {unhealthy 6 [{2022-11-21T13:15:29.210324494Z 2022-11-21T13:15:31.617566043Z 1 } {2022-11-21T13:16:02.472515722Z 2022-11-21T13:16:04.918606044Z 1 } {2022-11-21T13:16:35.690635907Z 2022-11-21T13:16:38.126636751Z 1 } {2022-11-21T13:17:08.734469375Z 2022-11-21T13:17:11.183019457Z 1 } {2022-11-21T13:17:38.165949695Z 2022-11-21T13:17:40.709216292Z 1 }]} # podman inspect testing_on_podman_2 --format {{.State.Status}} exited