Bug 2024229

Summary: Healthcheck does not work with podman, after container stop/start
Product: Red Hat Enterprise Linux 8 Reporter: Dariusz Wojewódzki <dwojewod>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Alex Jia <ajia>
Severity: high Docs Contact:
Priority: high    
Version: 8.5CC: bbaude, cpippin, dornelas, dwalsh, jligon, jnovy, lsm5, mheon, obockows, pthomas, smccarty, snanda, snangare, tsweeney, umohnani, ypu
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: podman-3.4.2-7.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2055212 (view as bug list) Environment:
Last Closed: 2022-05-10 13:28:28 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:    
Bug Blocks: 2055212    

Description Dariusz Wojewódzki 2021-11-17 16:18:26 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Release	Red Hat Enterprise Linux release 8.5 (Ootpa)
Kernel Version	4.18.0-348.2.1.el8_5
Booted kernel cmdline:
      BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-348.2.1.el8_5.x86_64 root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root 
      rd.lvm.lv=rhel/swap rhgb quiet fips=1 boot=UUID=3accbc1c-5551-4531-8090-e8afa6a1989f
	  
systemd-239-51.el8.x86_64
podman-3.3.1-9.module+el8.5.0+12697+018f24d7.x86_64 


The issue has been confirmed to appear on podman 3.2.3 and 3.3.1 



How reproducible:



[root@-rhel8 ~]# podman create -ti --name test07 --health-cmd /bin/false ubi8 bash
30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba
[root@-rhel8 ~]# podman start test07
test07
[root@-rhel8 ~]# ls -l /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.*
-rw-r--r--. 1 root root 441 Nov 17 12:28 /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.service
-rw-r--r--. 1 root root 275 Nov 17 12:28 /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.timer
[root@-rhel8 ~]# podman stop test07
test07
[root@-rhel8 ~]# ls -l /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.*
-rw-r--r--. 1 root root 441 Nov 17 12:28 /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.service
[root@-rhel8 ~]# podman start test07
ERRO[0001] Failed to start transient timer unit: Unit 30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.service already exists.
test07
[root@-rhel8 ~]# ls -l /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.*
-rw-r--r--. 1 root root 441 Nov 17 12:28 /run/systemd/transient/30f47b9734a0c22bfa38d4803c0f1dbc1467140d0be6b586d9e267093582d6ba.service
```


Actual results:
Since that no health check is ever executed.

Expected results:
The container can be started with no error

Comment 2 Tom Sweeney 2021-11-17 23:30:05 UTC
Brent, can you take a quick peak at this please?

Comment 5 Brent Baude 2021-12-16 20:13:07 UTC
upstream fix submitted for review -> https://github.com/containers/podman/pull/12634

Comment 6 Jindrich Novy 2021-12-17 08:35:18 UTC
Thanks Brent.

Can we get qa ack please?

Comment 7 Brent Baude 2021-12-23 17:36:01 UTC
We also need -> https://github.com/containers/podman/pull/12697  Need both fixes.

Comment 11 Daniel Walsh 2022-01-04 14:57:44 UTC
Jindrich is this going to make the 8.5.0.2 release?

Comment 16 Tom Sweeney 2022-01-05 15:02:48 UTC
Assigning to @jnovy for any further packaging and BZ needs

Comment 17 Jindrich Novy 2022-01-05 15:21:47 UTC
Backporting is not finished yet Tom, see comment #12. To be sure, we need this for bot rhel8 and 3.0 stable stream?

Comment 25 Daniel Walsh 2022-01-24 18:31:19 UTC
*** Bug 2043073 has been marked as a duplicate of this bug. ***

Comment 32 Tom Sweeney 2022-02-03 19:18:41 UTC
@bbaude please backport this to the Podman v3.4.2-rhel branch before the freeze for RHEL 8.5.0.3 which if February 22, although sooner would be better.  @snanda please add this to the list of RHEL 8.5.0.3 BZ's that we hope to complete.

Comment 35 Alex Jia 2022-02-09 15:44:15 UTC
This bug has been verified on podman-4.0.0-0.24.module+el8.6.0+14148+971a9e1a w/ runc-1.0.3-1.module+el8.6.0+13546+2b1a9684.

[root@kvm-08-guest18 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.6 Beta (Ootpa)

[root@kvm-08-guest18 ~]# rpm -q podman runc systemd kernel
podman-4.0.0-0.24.module+el8.6.0+14148+971a9e1a.x86_64
runc-1.0.3-1.module+el8.6.0+13546+2b1a9684.x86_64
systemd-239-56.el8.x86_64
kernel-4.18.0-364.el8.x86_64

[root@kvm-08-guest18 ~]# podman create -ti --name test01 --health-cmd /bin/false ubi8 bash
Resolved "ubi8" as an alias (/etc/containers/registries.conf.d/001-rhel-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 8671113e1c57 done
Copying blob 5dcbdc60ea6b done
Copying config b81e86a2cb done
Writing manifest to image destination
Storing signatures
5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772
[root@kvm-08-guest18 ~]# podman start test01
test01
[root@kvm-08-guest18 ~]# ls -l /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.*
-rw-r--r--. 1 root root 441 Feb  9 10:40 /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.service
-rw-r--r--. 1 root root 275 Feb  9 10:40 /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.timer
[root@kvm-08-guest18 ~]# podman stop test01
test01
[root@kvm-08-guest18 ~]# ls -l /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.*
ls: cannot access '/run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.*': No such file or directory
[root@kvm-08-guest18 ~]# podman start test01
test01
[root@kvm-08-guest18 ~]# ls -l /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.*
-rw-r--r--. 1 root root 441 Feb  9 10:41 /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.service
-rw-r--r--. 1 root root 275 Feb  9 10:41 /run/systemd/transient/5765117c370398ce91615207929511f3435c86747f486c1f773582ce00729772.timer

Comment 43 errata-xmlrpc 2022-05-10 13:28:28 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 (Important: 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-2022:1762