-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CONTAINER_NAME field is missing in journald logs #6290
Comments
@haircommander This is mostly a Conmon thing, IIRC - we'd need a flag to pass container name in, and then the journald log formatter would need to include it? |
conmon already has this capability |
Awesome! |
oops, we need a conmon fix too containers/conmon#154 |
@haircommander sure, thanks very much for your help and quick reply! |
@haircommander I'm sorry, I wasn't able to build fully functional podman from sources, but I built and tested them separately and everything seems to work fine. Thanks!
and from a separate conmon test
|
This is still unfixed in OL8, isn't it? I have the same problem |
I think it's best to reach out to Oracle Linux. |
I am using podman 3.3.1, which should already be fixed. I assume that OL can not help me. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
I'm using a journald driver for podman containers and the output used to include
CONTAINER_NAME
field. Unfortunately, all current podman versions (CentOS 8.1, Fedora 32) don't have it that makes the process of finding the actual container harder than necessary (reverse lookup container id, but it may not exist already). I can use--log-opt tag
to set custom tags, but it will be nice to have aCONTAINER_NAME
too, especially if someone forgets to set a tag. Also, I think that conmon supports container names in journald https://github.com/containers/conmon/blob/master/src/cli.c#L54 and https://github.com/containers/conmon/blob/master/src/ctr_logging.c#L124 but podman doesn't pass--name
or-n
to the conmon (https://github.com/containers/libpod/blob/master/libpod/oci_conmon_linux.go#L1348). Sorry if it's not an issue and it was done on purpose.Steps to reproduce the issue:
sudo podman run --log-driver journald -d --rm --name pony alpine echo aaaaaa
sudo journalctl -o json | grep 'echo aaaaaa' | tail -1 | jq
Describe the results you received:
Describe the results you expected:
Same as actual, but with CONTAINER_NAME set to
pony
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:(it's also true for 1.6.4 on CentOS 8.1)
Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Both AWS (with custom CentOS 8.1 image) and virtualbox (fedora/32-cloud-base)
The text was updated successfully, but these errors were encountered: