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

Log type not passed to containers by 'play kube --log-driver=journald' #10015

Closed
pascapascapascapasca opened this issue Apr 13, 2021 · 3 comments · Fixed by #10044
Closed

Log type not passed to containers by 'play kube --log-driver=journald' #10015

pascapascapascapasca opened this issue Apr 13, 2021 · 3 comments · Fixed by #10044
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

@pascapascapascapasca
Copy link

pascapascapascapasca commented Apr 13, 2021

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

/kind bug

Description

Containers created using 'podman play kube --log-driver=journald' don't have HostConfig.LogConfig.Type set to "journald" and the containers' logs don't go to the journal.

However, the right behavior is observed when using 'podman run --log-driver=journald'.

Steps to reproduce the issue:

  1. podman play kube --log-driver=journald <pod definition yaml path>

  2. podman inspect <created container id>

  3. podman run --log-driver=journald <container image name>

  4. podman inspect <created container id>

Describe the results you received:

Step 2 yields:
"LogConfig": {
"Type": "",
"Config": null,
"Path": "/var/lib/containers/storage/overlay-containers/bf5e9f6a6026b70a61b495b93e7f12924a091004001f40bbaa52fc2d9ccb0d7d/userdata/ctr.log",
"Tag": "",
"Size": "0B"
}

Step 4 yields:
"LogConfig": {
"Type": "journald",
"Config": null,
"Path": "",
"Tag": "",
"Size": "0B"
}

Describe the results you expected:

Expected "Type": "journald" at step 2.

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

Output of podman version:

Version:      3.0.1
API Version:  3.0.0
Go Version:   go1.15.5
Built:        Mon Mar  1 14:30:40 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.19.4
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.27-1.el7.1.1.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 2
  distribution:
    distribution: '"centos"'
    version: "7"
  eventLogger: journald
  hostname: vmccs-podman-3-0.local
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 3.10.0-1160.21.1.el7.x86_64
  linkmode: dynamic
  memFree: 2977427456
  memTotal: 3973283840
  ociRuntime:
    name: runc
    package: runc-1.0.0-150.rc93.el7.1.1.x86_64
    path: /usr/bin/runc
    version: |-
      runc version spec: 1.0.2-dev
      go: go1.15.5
      libseccomp: 2.3.1
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    selinuxEnabled: true
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 2h 23m 32.62s (Approximately 0.08 days)
registries:
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 10
    paused: 0
    running: 7
    stopped: 3
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 4
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 3.0.0
  Built: 1614609040
  BuiltTime: Mon Mar  1 14:30:40 2021
  GitCommit: ""
  GoVersion: go1.15.5
  OsArch: linux/amd64
  Version: 3.0.1

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

podman-3.0.1-2.el7.3.1.x86_64

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.):

OpenStack

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 13, 2021
@pascapascapascapasca
Copy link
Author

@andylibrian this is related to #6604

@Luap99 Luap99 self-assigned this Apr 15, 2021
@Luap99 Luap99 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Apr 15, 2021
Luap99 pushed a commit to Luap99/libpod that referenced this issue Apr 15, 2021
The --log-driver flag was silently ignored by podman play kube. This
regression got introduced during the play kube rework.
Unfortunately the test for this was skipped for no good reason.

Fixes containers#10015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
@Luap99
Copy link
Member

Luap99 commented Apr 15, 2021

PR #10044 should fix this.

@pascapascapascapasca
Copy link
Author

@Luap99 thank you very much!

mheon pushed a commit to mheon/libpod that referenced this issue Apr 16, 2021
The --log-driver flag was silently ignored by podman play kube. This
regression got introduced during the play kube rework.
Unfortunately the test for this was skipped for no good reason.

Fixes containers#10015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
jmguzik pushed a commit to jmguzik/podman that referenced this issue Apr 26, 2021
The --log-driver flag was silently ignored by podman play kube. This
regression got introduced during the play kube rework.
Unfortunately the test for this was skipped for no good reason.

Fixes containers#10015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
@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.

3 participants