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 1873204 - podman run --log-driver journald didn't works as expected
Summary: podman run --log-driver journald didn't works as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Jindrich Novy
QA Contact: Alex Jia
URL:
Whiteboard:
: 1873228 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-27 15:38 UTC by Joy Pu
Modified: 2022-09-21 06:29 UTC (History)
9 users (show)

Fixed In Version: podman-2.1.1-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-16 14:21:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joy Pu 2020-08-27 15:38:13 UTC
Description of problem:
podman run --log-driver journald didn't work as expect. When set log driver to journald, podman logs can not read logs from journald as expect.

Version-Release number of selected component (if applicable):
podman-2.0.4-3.module+el8.3.0+7716+ce654703.x86_64

How reproducible:


Steps to Reproduce:
1. start a container with --log-driver journald
# podman run --log-driver journald --name test-journald ubi8 echo x3issjHHMm4yiacrJDWZfN82hatJFo
x3issjHHMm4yiacrJDWZfN82hatJFo
2. Check if it logs the output into journald
# journalctl | grep x3issjHHMm4yiacrJDWZfN82hatJFo
Aug 27 11:22:35 hpe-dl380pgen8-02-vm-9.hpe2.lab.eng.bos.redhat.com conmon[166134]: x3issjHHMm4yiacrJDWZfN82hatJFo
3. Use podman logs to check if we can get the logs from journald
# podman  logs test-journald

Actual results:
podman logs return nothing

Expected results:
podman logs should can get the string echo from run

Additional info:

Comment 1 Tom Sweeney 2020-08-27 15:58:35 UTC
Ashley, I suspect this is fixed upstream.  Can you verify please, and if not, dig in?

Comment 2 Ashley Cui 2020-08-27 16:36:22 UTC
nope, looks broken, ill start digging soon

```
[acui@localhost podman]$ ./bin/podman run --log-driver journald --name test-journald ubi8 echo x3issjHHMm4yiacrJDWZfN82hatJFo
x3issjHHMm4yiacrJDWZfN82hatJFo
[acui@localhost podman]$ journalctl | grep x3issjHHMm4yiacrJDWZfN82hatJFo
Aug 27 12:34:48 localhost.localdomain conmon[146551]: x3issjHHMm4yiacrJDWZfN82hatJFo
[acui@localhost podman]$ ./bin/podman  logs test-journald
```

Comment 3 Tom Sweeney 2020-08-27 19:29:32 UTC
Just noting that an issue with the same footprint was also logged against upstream: https://github.com/containers/podman/issues/7476

Comment 4 Tom Sweeney 2020-08-27 19:38:08 UTC
*** Bug 1873228 has been marked as a duplicate of this bug. ***

Comment 6 Ashley Cui 2020-10-02 15:07:47 UTC
PR here: https://github.com/containers/podman/pull/7893

Comment 15 Alex Jia 2020-11-10 14:15:39 UTC
Verified on podman-2.1.1-3.module+el8.3.1+8686+2a59bca3.x86_64 w/ crun-0.15.1-1.module+el8.3.1+8686+2a59bca3.x86_64
and runc-1.0.0-68.rc92.module+el8.3.1+8686+2a59bca3.x86_64.

[root@ibm-x3650m4-01-vm-15 ~]# podman run --log-driver journald --name test-journald ubi8 echo x3issjHHMm4yiacrJDWZfN82hatJFo
Trying to pull registry.access.redhat.com/ubi8...
Getting image source signatures
Copying blob 6500ac87b29f done
Copying blob 1b8dabac56ed done
Copying config 33df2983b0 done
Writing manifest to image destination
Storing signatures
x3issjHHMm4yiacrJDWZfN82hatJFo
[root@ibm-x3650m4-01-vm-15 ~]# journalctl | grep x3issjHHMm4yiacrJDWZfN82hatJFo
Nov 10 09:10:38 ibm-x3650m4-01-vm-15.ibm2.lab.eng.bos.redhat.com conmon[2274]: x3issjHHMm4yiacrJDWZfN82hatJFo
[root@ibm-x3650m4-01-vm-15 ~]# podman  logs test-journald
x3issjHHMm4yiacrJDWZfN82hatJFo

[root@ibm-x3650m4-01-vm-15 ~]# podman info|grep -iA2 runtime
  ociRuntime:
    name: crun
    package: crun-0.15.1-1.module+el8.3.1+8686+2a59bca3.x86_64

[root@ibm-x3650m4-01-vm-15 ~]# podman run --runtime=/usr/bin/runc --log-driver journald --name test-journald-runc ubi8 echo helloissjHHMm4yiacrJDWZfN82hatJFo
helloissjHHMm4yiacrJDWZfN82hatJFo
[root@ibm-x3650m4-01-vm-15 ~]# journalctl | grep helloissjHHMm4yiacrJDWZfN82hatJFo
Nov 10 09:13:17 ibm-x3650m4-01-vm-15.ibm2.lab.eng.bos.redhat.com conmon[2598]: helloissjHHMm4yiacrJDWZfN82hatJFo
[root@ibm-x3650m4-01-vm-15 ~]# podman logs test-journald-runc
helloissjHHMm4yiacrJDWZfN82hatJFo

Comment 17 errata-xmlrpc 2021-02-16 14:21:45 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: 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-2021:0531


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