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.
Bug 2180125 - --health-on-failure=restart doesn't restart container [rhel-8.8.0.z]
Summary: --health-on-failure=restart doesn't restart container [rhel-8.8.0.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.9
Hardware: All
OS: All
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Alex Jia
URL:
Whiteboard:
Depends On: 2180104
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-20 18:47 UTC by RHEL Program Management Team
Modified: 2023-05-16 11:39 UTC (History)
22 users (show)

Fixed In Version: podman-4.4.1-8.el8_8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2180104
Environment:
Last Closed: 2023-05-16 10:01:09 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github containers podman pull 17863 0 None open [v4.4.1-rhel] fix --health-on-failure=restart in transient unit 2023-03-21 08:39:30 UTC
Red Hat Issue Tracker RHELPLAN-152456 0 None None None 2023-03-20 18:48:58 UTC
Red Hat Product Errata RHBA-2023:3089 0 None None None 2023-05-16 10:01:27 UTC

Comment 1 Tom Sweeney 2023-03-20 19:07:13 UTC
Valentin, please use this BZ and https://bugzilla.redhat.com/show_bug.cgi?id=2180126 to merge into the Podman v4.4.1-rhel branch when your patch there is ready.

Comment 2 Valentin Rothberg 2023-03-21 08:21:38 UTC
Opened PR: https://github.com/containers/podman/pull/17863

Comment 3 Valentin Rothberg 2023-03-21 11:53:55 UTC
PR has merged, assigning to Jindrich.

Comment 7 Alex Jia 2023-03-23 10:32:29 UTC
This bug has been verified on podman-4.4.1-8.module+el8.8.0+18438+15d3aa65.

[root@kvm-04-guest20 ~]# sh -x test.sh 
+ IMG=ubi8
+ podman ps -a
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
+ podman run --replace -d --name true_container --health-cmd true --health-on-failure=restart --health-interval 15s --health-retries=2 ubi8 sleep 300
42abedc89733dcdd97e58866c390c82a3601a0c87a644d8cb21f863d097e514f
+ podman run --replace -d --name false_container --health-cmd false --health-on-failure=restart --health-interval 15s --health-retries=2 ubi8 sleep 300
726ea8bf4ebc93a2e3d57299de8e2449bc0a32d54083f34a6994461a2956c8e2
++ date +%H:%M:%S
+ echo 06:24:37 Created false_container
06:24:37 Created false_container
+ true
+ sleep 5
+ date +%H:%M:%S
06:24:42
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED        STATUS                   PORTS       NAMES
42abedc89733  registry.access.redhat.com/ubi8:latest  sleep 300   6 seconds ago  Up 6 seconds (healthy)               true_container
726ea8bf4ebc  registry.access.redhat.com/ubi8:latest  sleep 300   5 seconds ago  Up 5 seconds (starting)              false_container
+ true
+ sleep 5
+ date +%H:%M:%S
06:24:47
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
42abedc89733  registry.access.redhat.com/ubi8:latest  sleep 300   11 seconds ago  Up 11 seconds (healthy)               true_container
726ea8bf4ebc  registry.access.redhat.com/ubi8:latest  sleep 300   10 seconds ago  Up 10 seconds (starting)              false_container
+ true
+ sleep 5
+ date +%H:%M:%S
06:24:52
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
42abedc89733  registry.access.redhat.com/ubi8:latest  sleep 300   16 seconds ago  Up 16 seconds (healthy)               true_container
726ea8bf4ebc  registry.access.redhat.com/ubi8:latest  sleep 300   15 seconds ago  Up 15 seconds (starting)              false_container
+ true
+ sleep 5
+ date +%H:%M:%S
06:24:57
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                   PORTS       NAMES
42abedc89733  registry.access.redhat.com/ubi8:latest  sleep 300   21 seconds ago  Up 21 seconds (healthy)              true_container
726ea8bf4ebc  registry.access.redhat.com/ubi8:latest  sleep 300   20 seconds ago  Stopping (unhealthy)                 false_container
+ true
+ sleep 5
+ date +%H:%M:%S
06:25:02
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                   PORTS       NAMES
42abedc89733  registry.access.redhat.com/ubi8:latest  sleep 300   26 seconds ago  Up 26 seconds (healthy)              true_container
726ea8bf4ebc  registry.access.redhat.com/ubi8:latest  sleep 300   25 seconds ago  Stopping (unhealthy)                 false_container
+ true
+ sleep 5
+ date +%H:%M:%S
06:25:07
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                   PORTS       NAMES
42abedc89733  registry.access.redhat.com/ubi8:latest  sleep 300   31 seconds ago  Up 31 seconds (healthy)              true_container
726ea8bf4ebc  registry.access.redhat.com/ubi8:latest  sleep 300   30 seconds ago  Up 4 seconds (starting)              false_container
...ignore...

Comment 12 errata-xmlrpc 2023-05-16 10:01:09 UTC
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 (container-tools:rhel8 bug fix 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/RHBA-2023:3089


Note You need to log in before you can comment on or make changes to this bug.