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 2020332 - No events reported when creating pod with --infra=false
Summary: No events reported when creating pod with --infra=false
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: podman
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Charlie Doern
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On: 2009296
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-04 15:52 UTC by Katerina Koukiou
Modified: 2022-02-08 21:48 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2009296
Environment:
Last Closed: 2022-02-08 21:41:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-101771 0 None None None 2021-11-04 22:09:19 UTC

Description Katerina Koukiou 2021-11-04 15:52:06 UTC
+++ This bug was initially created as a clone of Bug #2009296 +++

Description of problem:
In Cockpit CI we updated to new podman 4.0 in rhel-9-0 and now we are not getting any more pod specific events when using --infra=false.

Version-Release number of selected component (if applicable):
podman-3.4.2-0.2.el9.x86_64
containers-common-1-8.el9.noarch

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}

--- Additional comment from Matthew Heon on 2021-09-30 12:22:48 UTC ---

Charlie, mind taking a quick look at this one?

--- Additional comment from Charlie Doern on 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.

--- Additional comment from Charlie Doern on 2021-09-30 18:29:32 UTC ---

PR opened:

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

--- Additional comment from Charlie Doern on 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.

--- Additional comment from Jindrich Novy on 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.

--- Additional comment from Charlie Doern on 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

--- Additional comment from Jindrich Novy on 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?

--- Additional comment from Matthew Heon on 2021-10-26 13:20:41 UTC ---

Sure

Comment 1 Tom Sweeney 2021-11-05 16:56:52 UTC
Assigning to Charlie who addressed the original BZ.

Comment 2 Charlie Doern 2021-11-08 03:27:09 UTC
on my machine with `podman version 4.0.0-dev` running: 

`curl -XPOST --unix-socket /run/user/1000/podman/podman.sock -v -H content-type:application/json http://d/v3.0.0/libpod/pods/create -d '{"name":"foo", "infra":"false"}'`

followed by 

`curl --unix-socket /run/user/1000/podman/podman.sock http://d/v3.0.0/libpod/events?since=2m`

results in an output of:

`{"status":"create","id":"1a165c3232c1e2e05b5618dbb620f41efc0146507d48236e3abf7f167da1c0d3","from":"localhost/podman-pause:4.0.0-dev-1636340683","Type":"container","Action":"create","Actor":{"ID":"1a165c3232c1e2e05b5618dbb620f41efc0146507d48236e3abf7f167da1c0d3","Attributes":{"containerExitCode":"0","image":"localhost/podman-pause:4.0.0-dev-1636340683","io.buildah.version":"1.23.1","name":"edaae17ca5ce-infra"}},"scope":"local","time":1636341766,"timeNano":1636341766990067453}
{"status":"create","id":"edaae17ca5ce5cf3d78172e1abee7e8b5ed72a689e0722f366d750259329c875","Type":"pod","Action":"create","Actor":{"ID":"edaae17ca5ce5cf3d78172e1abee7e8b5ed72a689e0722f366d750259329c875","Attributes":{"containerExitCode":"0","image":"","name":"foo"}},"scope":"local","time":1636341766,"timeNano":1636341766995974539}`

which lists both infra and the pod being created. I am not sure how to go about resolving this, since the issue is identical just on RHEL 9. Is it possible that the version of podman is not up to date with the main branch?

Comment 3 Martin Pitt 2021-11-08 05:20:17 UTC
@Charlie: It's most probably fixed upstream already, but RHEL 9.0 currently has podman-1:3.4.2-0.2.el9.x86_64

Comment 4 Tom Sweeney 2022-02-08 21:41:53 UTC
This has been fixed upstream, tested there, and is present in Podman v4.0 which is targeted for RHEL 8.6.  I'm going to close this as current release.


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