Skip to content
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

Some options of podman run --log-driver didn't work as expect #7476

Closed
ypu opened this issue Aug 27, 2020 · 4 comments · Fixed by #7893
Closed

Some options of podman run --log-driver didn't work as expect #7476

ypu opened this issue Aug 27, 2020 · 4 comments · Fixed by #7893
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@ypu
Copy link
Contributor

ypu commented Aug 27, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

During the test, find journald and json-file are not work as expect when we start a container with --log-driver.

Steps to reproduce the issue:

  1. Start a container with --log-driver $option
    json-file:
# podman run --log-driver json-file --log-opt path=/tmp/podman_bats.bFdqwg/json-file.log --name test-jsonfile quay.io/libpod/alpine_labels:latest echo ngM3fQo9E4mDJGvSpCX74zYrVjouSW

journald:

# podman run --log-driver journald --name test-journald ubi8 echo x3issjHHMm4yiacrJDWZfN82hatJFo
  1. Check the message is store in the file as expect
    json-file:
# grep ngM3fQo9E4mDJGvSpCX74zYrVjouSW /tmp/podman_bats.bFdqwg/json-file.log 

journald:

#  journalctl | grep x3issjHHMm4yiacrJDWZfN82hatJFo
  1. Use podman logs to check podman can get the logs as expect
# podman logs $contianer_id

Describe the results you received:
For json-file:
step 2 report no such file
step 3 can get nothing from the output

For journald:
step 3 can get nothing from the output

Describe the results you expected:
podman run can write the logs to expect file and podman logs can get them correctly

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

# podman version
Version:      2.1.0-dev
API Version:  1
Go Version:   go1.14.6
Built:        Thu Jan  1 08:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.0-dev
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.19-1.fc32.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.19, commit: 5dce9767526ed27f177a8fa3f281889ad509fea7'
  cpus: 4
  distribution:
    distribution: fedora
    version: "32"
  eventLogger: file
  hostname: bootp-73-3-208.eng.pek2.redhat.com
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.7.15-200.fc32.x86_64
  linkmode: dynamic
  memFree: 4882079744
  memTotal: 8340852736
  ociRuntime:
    name: runc
    package: runc-1.0.0-144.dev.gite6555cc.fc32.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc10+dev
      commit: fbdbaf85ecbc0e077f336c03062710435607dbf1
      spec: 1.0.1-dev
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 4294963200
  swapTotal: 4294963200
  uptime: 72h 8m 8.32s (Approximately 3.00 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 1
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 08:00:00 1970
  GitCommit: ""
  GoVersion: go1.14.6
  OsArch: linux/amd64
  Version: 2.1.0-dev

Package info (e.g. output of rpm -q podman or apt list podman):

(paste your output here)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 27, 2020
@QiWang19
Copy link
Contributor

for the usage --log-driver journald, looks like the podman logs has not been fully implemented for journald?

case define.JournaldLogging:
// TODO Skip sending logs until journald logs can be read
return c.readFromJournal(ctx, options, logChannel)

@TomSweeneyRedHat
Copy link
Member

This might be related to https://bugzilla.redhat.com/show_bug.cgi?id=1873204 @ashley-cui

@ashley-cui
Copy link
Member

@TomSweeneyRedHat yep, looks like same issue

@vrothberg vrothberg self-assigned this Sep 18, 2020
@vrothberg
Copy link
Member

I am taking a look at the code to see what we can do.

@vrothberg vrothberg removed their assignment Sep 28, 2020
@ashley-cui ashley-cui added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Sep 28, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants