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

Fixed In Version: podman-4.4.1-5.el9_2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2180108
Environment:
Last Closed: 2023-05-09 11:02:52 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:40:33 UTC
Red Hat Issue Tracker RHELPLAN-152457 0 None None None 2023-03-20 18:49:07 UTC
Red Hat Product Errata RHBA-2023:2620 0 None None None 2023-05-09 11:03:07 UTC

Comment 1 Tom Sweeney 2023-03-20 19:07:37 UTC
Valentin, please use this BZ and https://bugzilla.redhat.com/show_bug.cgi?id=2180125 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:47 UTC
Opened PR: https://github.com/containers/podman/pull/17863

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

Comment 6 Alex Jia 2023-03-23 09:36:38 UTC
This bug has been verified on podman-4.4.1-5.el9_2.

[root@kvm-01-guest10 ~]# sh -x test.sh 
+ IMG=ubi8
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   10 minutes ago  Exited (0) 4 minutes ago              frosty_sammet
+ podman run --replace -d --name true_container --health-cmd true --health-on-failure=restart --health-interval 15s --health-retries=2 ubi8 sleep 300
50a6aa7f921dff6b823dc39e571d80d4548960f82658574c8066f8215155a2a0
+ podman run --replace -d --name false_container --health-cmd false --health-on-failure=restart --health-interval 15s --health-retries=2 ubi8 sleep 300
0699bad073c3006fed5b1fd2a353a96d8d19ca6e214deffd6463020946c2b07a
++ date +%H:%M:%S
+ echo 05:01:43 Created false_container
05:01:43 Created false_container
+ true
+ sleep 5
+ date +%H:%M:%S
05:01:48
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   10 minutes ago  Exited (0) 5 minutes ago              frosty_sammet
50a6aa7f921d  registry.access.redhat.com/ubi8:latest  sleep 300   5 seconds ago   Up 5 seconds (healthy)                true_container
0699bad073c3  registry.access.redhat.com/ubi8:latest  sleep 300   5 seconds ago   Up 5 seconds (starting)               false_container
+ true
+ sleep 5
+ date +%H:%M:%S
05:01:53
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   10 minutes ago  Exited (0) 5 minutes ago              frosty_sammet
50a6aa7f921d  registry.access.redhat.com/ubi8:latest  sleep 300   10 seconds ago  Up 10 seconds (healthy)               true_container
0699bad073c3  registry.access.redhat.com/ubi8:latest  sleep 300   10 seconds ago  Up 10 seconds (starting)              false_container
+ true
+ sleep 5
+ date +%H:%M:%S
05:01:58
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   10 minutes ago  Exited (0) 5 minutes ago              frosty_sammet
50a6aa7f921d  registry.access.redhat.com/ubi8:latest  sleep 300   15 seconds ago  Up 15 seconds (healthy)               true_container
0699bad073c3  registry.access.redhat.com/ubi8:latest  sleep 300   15 seconds ago  Up 15 seconds (starting)              false_container
+ true
+ sleep 5
+ date +%H:%M:%S
05:02:03
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   10 minutes ago  Exited (0) 5 minutes ago              frosty_sammet
50a6aa7f921d  registry.access.redhat.com/ubi8:latest  sleep 300   20 seconds ago  Up 20 seconds (healthy)               true_container
0699bad073c3  registry.access.redhat.com/ubi8:latest  sleep 300   20 seconds ago  Stopping (unhealthy)                  false_container
+ true
+ sleep 5
+ date +%H:%M:%S
05:02:08
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   10 minutes ago  Exited (0) 5 minutes ago              frosty_sammet
50a6aa7f921d  registry.access.redhat.com/ubi8:latest  sleep 300   25 seconds ago  Up 25 seconds (healthy)               true_container
0699bad073c3  registry.access.redhat.com/ubi8:latest  sleep 300   25 seconds ago  Stopping (unhealthy)                  false_container
+ true
+ sleep 5
+ date +%H:%M:%S
05:02:13
+ podman ps -a
CONTAINER ID  IMAGE                                   COMMAND     CREATED         STATUS                    PORTS       NAMES
329a5332b8ca  registry.access.redhat.com/ubi8:latest  sleep 300   11 minutes ago  Exited (0) 5 minutes ago              frosty_sammet
50a6aa7f921d  registry.access.redhat.com/ubi8:latest  sleep 300   30 seconds ago  Up 30 seconds (healthy)               true_container
0699bad073c3  registry.access.redhat.com/ubi8:latest  sleep 300   30 seconds ago  Up 4 seconds (starting)               false_container
...ignore...

Comment 19 errata-xmlrpc 2023-05-09 11:02:52 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 (podman 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/RHBA-2023:2620


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