Bug 2009296

Summary: No events reported when creating pod with --infra=false
Product: Red Hat Enterprise Linux 8 Reporter: Matej Marušák <mmarusak>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Edward Shen <weshen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.6CC: bbaude, cdoern, dwalsh, jligon, jnovy, lsm5, mheon, mpitt, pthomas, tsweeney, umohnani, ypu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: CockpitTest
Fixed In Version: podman-4.0.0-0.24.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2020332 (view as bug list) Environment:
Last Closed: 2022-05-10 13:27:52 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: 2020332    

Description Matej Marušák 2021-09-30 10:04:51 UTC
Description of problem:
In Cockpit CI we updated to new podman 4.0 in rhel-8.6 and now we are not getting any more pod specific events when using --infra=false.

Version-Release number of selected component (if applicable):
podman-4.0.0-0.10.module+el8.6.0+12734+7d3a79c8.x86_64
conmon-2.0.30-1.module+el8.6.0+12727+cc05c9e2.x86_64
containers-common-1-4.module+el8.6.0+12734+7d3a79c8.noarch
criu-3.15-3.module+el8.6.0+12698+b6644727.x86_64
systemd-239-50.el8.x86_64
kernel-4.18.0-345.1.el8.x86_64

Steps to Reproduce:
1. Start listening on events `curl --unix-socket /run/podman/podman.sock http://d/v1.24/events`
2. Create new pod `podman pod create --infra=false`

Actual results:
No events are reported. If I drop the `--infra=false` then I get 3 events:
```
{"status":"create","id":"6a027d725baac467a62dc0472997a34a2d9cc60dd3d5bdd6f8d1c7a3e81afa7c","from":"k8s.gcr.io/pause:3.5","Type":"container","Action":"create","Actor":{"ID":"6a027d725baac467a62dc0472997a34a2d9cc60dd3d5bdd6f8d1c7a3e81afa7c","Attributes":{"containerExitCode":"0","image":"k8s.gcr.io/pause:3.5","name":"980d9a2e76f0-infra"}},"scope":"local","time":1632995495,"timeNano":1632995495530715340}
{"status":"create","id":"980d9a2e76f07bcdbfb590653b422158ee1c4d93b0fc3a42545ac179ee08d890","Type":"pod","Action":"create","Actor":{"ID":"980d9a2e76f07bcdbfb590653b422158ee1c4d93b0fc3a42545ac179ee08d890","Attributes":{"containerExitCode":"0","image":"","name":"reverent_blackburn"}},"scope":"local","time":1632995495,"timeNano":1632995495531066139}
{"status":"pull","Type":"image","Action":"pull","Actor":{"ID":"","Attributes":{"containerExitCode":"0","image":"","name":"k8s.gcr.io/pause:3.5"}},"scope":"local","time":1632995495,"timeNano":1632995495493199993}
```
The middle one has Type=pod - which should be reported even when --infra=false. 


Expected results:
On previous version doing the same reported:
{"Type":"pod","Action":"create","Actor":{"ID":"d9c732d56a646ff44a38b3d187814bc0d29b6298e1f906a4866be36c121f2bf4","Attributes":{"containerExitCode":"0","image":"","name":"vibrant_shirley"}},"scope":"local","time":1632996219,"timeNano":1632996219213335831}

Comment 1 Matthew Heon 2021-09-30 12:22:48 UTC
Charlie, mind taking a quick look at this one?

Comment 2 Charlie Doern 2021-09-30 14:37:55 UTC
Yes, I will take a look at this today, probably just needs some rewiring in the libpod api handler for pod creation.

Comment 3 Charlie Doern 2021-09-30 18:29:32 UTC
PR opened:

https://github.com/containers/podman/pull/11816

Comment 4 Charlie Doern 2021-10-13 18:18:33 UTC
Fixed by PR https://github.com/containers/podman/pull/11816 required movement of pod creation event to a more accessible location.

Comment 5 Jindrich Novy 2021-10-14 08:25:13 UTC
Was this backported to v3.4 branch too Charlie? We have podman-3.4 in RHEL-8.6.0.

Comment 6 Charlie Doern 2021-10-25 02:25:23 UTC
I am not sure on the backport status, looking at the most recent backports: https://github.com/containers/podman/pull/12040 it does not seem to have made it in @jnovy  Not familiar with the backporting process so I could be missing something here, but to be safe I will ask Matt monday morning

Comment 7 Jindrich Novy 2021-10-25 08:58:35 UTC
No problems Charlie, thanks for the commit into the main branch. Matt, do you mind having quick looak at backporting this to v3.4 too?

Comment 8 Matthew Heon 2021-10-26 13:20:41 UTC
Sure

Comment 9 Tom Sweeney 2022-02-08 21:24:58 UTC
This does not look like it was backported to either the v3.4 or v3.4.2-rhel branches.  Howver, Podman 4.0 has the fix and is now targeted for RHEL 8.6 which is what this BZ is targeted for.  I'm going to set this BZ to Post and will ask @jnovy to clean up any further BZ or packaging needs with it.  

@mmarusak I'm not sure if you need this in RHEL 8.5.* and Podman 3.4 or not.  If you do, please clone this BZ against those versions and we'll consider backporting.

Comment 11 Matej Marušák 2022-02-09 08:59:32 UTC
> I'm not sure if you need this in RHEL 8.5.* and Podman 3.4 or not.  If you do, please clone this BZ against those versions and we'll consider backporting.

We are not testing 8.5 for cockpit-podman, so I am unable to say if it is affected as well. From my point of view 8.6 is the one that needs fixing. Also it is rather corner case so chance that users will hit this issue is rather small + there is easy workaround (just reload the page).

Comment 20 errata-xmlrpc 2022-05-10 13:27: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 (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