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

Podman emits a died event instead of die event when container stops #10168

Closed
davemulford opened this issue Apr 28, 2021 · 5 comments · Fixed by #10171
Closed

Podman emits a died event instead of die event when container stops #10168

davemulford opened this issue Apr 28, 2021 · 5 comments · Fixed by #10171
Assignees
Labels
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

@davemulford
Copy link

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

/kind bug

Description

When a container is stopped, podman emits a died event. This is incompatible with Docker that emits a die event.

Steps to reproduce the issue:

  1. Run a container and make sure that it exits.
# podman run --rm -ti registry.redhat.io/rhel8/support-tools id
uid=0(root) gid=0(root) groups=0(root)
  1. Verify the died event is generated.
# podman events --since 5m | grep die
2021-04-28 11:23:27.633897365 -0400 EDT container died 69d9b51cb1f6a4916404880f474c34943be795f9ce5e8973f788a326658f1077 (image=registry.redhat.io/rhel8/support-tools, name=festive_allen)

Describe the results you received:

Podman generated a died event.

Describe the results you expected:

I'd expect to see a die event.

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

Output of podman version:

$ podman version
Version:      3.2.0-dev
API Version:  3.2.0-dev
Go Version:   go1.15.11
Git Commit:   ec42db68e0b4b703d3e4ab173630ab386aaf052e
Built:        Sat Aug  4 00:00:00 2018
OS/Arch:      linux/amd64

Output of podman info --debug:

$ podman info --debug
host:
  arch: amd64
  buildahVersion: 1.20.1-dev
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.27-2.fc33.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 24
  distribution:
    distribution: fedora
    version: "33"
  eventLogger: journald
  hostname: woodhouse
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.10.11-200.fc33.x86_64
  linkmode: dynamic
  memFree: 51972804608
  memTotal: 135073447936
  ociRuntime:
    name: crun
    package: crun-0.19.1-2.fc33.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.19.1
      commit: 1535fedf0b83fb898d449f9680000f729ba719f5
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_AUDIT_WRITE,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: true
    seccompEnabled: true
    selinuxEnabled: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.9-1.fc33.x86_64
    version: |-
      slirp4netns version 1.1.9
      commit: 4e37ea557562e0d7a64dc636eff156f64927335e
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 4208148480
  swapTotal: 4294963200
  uptime: 2009h 11m 51.68s (Approximately 83.71 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/dmulford/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.fc33.x86_64
      Version: |-
        fusermount3 version: 3.9.3
        fuse-overlayfs: version 1.5
        FUSE library version 3.9.3
        using FUSE kernel interface version 7.31
  graphRoot: /home/dmulford/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 4
  runRoot: /run/user/1000/containers
  volumePath: /home/dmulford/.local/share/containers/storage/volumes
version:
  APIVersion: 3.2.0-dev
  Built: 1533340800
  BuiltTime: Sat Aug  4 00:00:00 2018
  GitCommit: ec42db68e0b4b703d3e4ab173630ab386aaf052e
  GoVersion: go1.15.11
  OsArch: linux/amd64
  Version: 3.2.0-dev

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

podman built from source at commit ba9c1f3.

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes

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

Physical machine running Fedora 33 and podman built from source at commit ba9c1f3.

For reference, Docker generates a die event as seen here: https://gist.github.com/davemulford/b9fdf09d377601bb460df138cd89dda1

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

rhatdan commented Apr 28, 2021

Is this something to just fix in the API or fix all over, this could be a breaking change for existing users of podman?
@jwhonce @baude @mheon WDYT?

@mheon
Copy link
Member

mheon commented Apr 28, 2021

We haven't really made solid promises about Events matching exactly, and we already have a number of apps (Cockpit notably) using the existing Died event, so I don't think we can change at this point. Maybe a Podman 4.0 thing next year?

Changing it in the Compat API does seem reasonable as a solution for the moment.

rhatdan added a commit to rhatdan/podman that referenced this issue Apr 28, 2021
In order to be more compatible with Docker, we should return a
container die status rather then a "container died", Too late to
change this for Podman.

Partially fixes: containers#10168

[NO TESTS NEEDED] No easy way to test this.

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan self-assigned this Apr 28, 2021
@mheon mheon reopened this Apr 29, 2021
@mheon
Copy link
Member

mheon commented Apr 29, 2021

Reopening given we didn't fix this fully - just the API bit.

@rhatdan
Copy link
Member

rhatdan commented Apr 29, 2021

@davemulford What do you think? Is changing the API good enough. I think the died reads better in Podman the container die.

@rhatdan
Copy link
Member

rhatdan commented May 14, 2021

Since we did not get a response, I take it as it is good enough. Closing.

@rhatdan rhatdan closed this as completed May 14, 2021
leahneukirchen added a commit to leahneukirchen/podman that referenced this issue Dec 17, 2021
Since containers#10168, on the event "died", the Status is set to "die"
for compatibility with the Docker API.  Docker also sets
the field Action to "died", so do the same here.

Signed-off-by: Leah Neukirchen <[email protected]>
@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
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.

4 participants