Bug 2180108

Summary: --health-on-failure=restart doesn't restart container
Product: Red Hat Enterprise Linux 9 Reporter: Tom Sweeney <tsweeney>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Alex Jia <ajia>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 9.3CC: acui, bbaude, container-sig, debarshir, dwalsh, extras-qa, gary.revell, go-sig, jnovy, lsm5, mboddu, mheon, patrick, pehunt, pthomas, rh.container.bot, santiago, tsweeney, umohnani, vrothber, ypu
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: podman-4.4.1-5.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2179369
: 2180126 (view as bug list) Environment:
Last Closed: 2023-11-07 08:33:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2179369    
Bug Blocks: 2180126    

Comment 1 Tom Sweeney 2023-03-20 18:04:32 UTC
assigning to Valentin

Comment 2 Tom Sweeney 2023-03-20 18:35:05 UTC
Creating a ZeroDay for this BZ

Comment 4 Valentin Rothberg 2023-03-21 08:32:47 UTC
Opened PR: https://github.com/containers/podman/pull/17864

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

Comment 8 Alex Jia 2023-03-27 09:30:18 UTC
This bug has been verified on podman-4.4.1-6.el9.x86_64.

[root@kvm-02-guest06 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.2 Beta (Plow)

[root@kvm-02-guest06 ~]# rpm -q podman crun systemd kernel
podman-4.4.1-6.el9.x86_64
crun-1.8.3-1.el9.x86_64
systemd-252-13.el9_2.x86_64
kernel-5.14.0-289.el9.x86_64

[root@kvm-02-guest06 podman]# bats -t test/system/220-healthcheck.bats 
1..4
ok 1 podman healthcheck
ok 2 podman healthcheck - restart cleans up old state
ok 3 podman healthcheck --health-on-failure
ok 4 podman healthcheck --health-on-failure with interval

Comment 9 Alex Jia 2023-05-15 03:02:07 UTC
This bug also is verified on podman-4.5.0-1.el9 with crun-1.8.3-1.el9.

Comment 12 Alex Jia 2023-06-25 03:28:44 UTC
This bug is verified both on podman-4.5.1-2.el9 and podman-4.5.0-4.el9 with crun-1.8.5-1.el9.

[root@kvm-04-guest04 podman]# bats -f "health-on-failure"  -t test/system/220-healthcheck.bats
1..2
ok 1 podman healthcheck --health-on-failure
ok 2 podman healthcheck --health-on-failure with interval

Comment 14 errata-xmlrpc 2023-11-07 08:33:59 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 (Moderate: podman 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:6474