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

Events for Network #24032

Closed
PHHENS opened this issue Sep 22, 2024 · 6 comments · Fixed by #24412
Closed

Events for Network #24032

PHHENS opened this issue Sep 22, 2024 · 6 comments · Fixed by #24412
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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

@PHHENS
Copy link

PHHENS commented Sep 22, 2024

Issue Description

Podman does not generate events about network.

Steps to reproduce the issue

  1. In one console run : podman events
  2. In a another console create a new network : podman network create -d macvlan -o parent=eth0 newnet
  3. Preceding "podman events" command should return a network creation event.

This works using docker, "docker events" returns :
2024-09-22T11:13:53.675328084+02:00 network create e8b293029385f147e18459e093bd5ac40226323ef2a28c504f16cad4f6b54278 (name=newnet, type=macvlan)

Thanks for feedback

Describe the results you received

No result

Describe the results you expected

2024-09-22T11:13:53.675328084+02:00 network create e8b293029385f147e18459e093bd5ac40226323ef2a28c504f16cad4f6b54278 (name=newnet, type=macvlan)

podman info output

host:
  arch: amd64
  buildahVersion: 1.37.2
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon_2.1.10+ds1-1+b1_amd64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: unknown'
  cpuUtilization:
    idlePercent: 99.53
    systemPercent: 0.24
    userPercent: 0.23
  cpus: 4
  databaseBackend: sqlite
  distribution:
    codename: trixie
    distribution: debian
    version: unknown
  eventLogger: journald
  freeLocks: 2048
  hostname: Debian11LaboVideoC101
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.10.9-amd64
  linkmode: dynamic
  logDriver: journald
  memFree: 23782264832
  memTotal: 33616388096
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns_1.12.2-1_amd64
      path: /usr/lib/podman/aardvark-dns
      version: aardvark-dns 1.12.2
    package: netavark_1.12.1-3_amd64
    path: /usr/lib/podman/netavark
    version: netavark 1.12.1
  ociRuntime:
    name: crun
    package: crun_1.17-1_amd64
    path: /usr/bin/crun
    version: |-
      crun version 1.17
      commit: 000fa0d4eeed8938301f3bcf8206405315bc1017
      rundir: /run/user/0/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt_0.0~git20240906.6b38f07-1_amd64
    version: |
      pasta 0.0~git20240906.6b38f07-1
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: true
    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
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns_1.2.1-1+b1_amd64
    version: |-
      slirp4netns version 1.2.1
      commit: 09e31e92fa3d2a1d3ca261adaeb012c8d75a8194
      libslirp: 4.8.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.5
  swapFree: 1023406080
  swapTotal: 1023406080
  uptime: 74h 41m 46.00s (Approximately 3.08 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries: {}
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 255034654720
  graphRootUsed: 68488167424
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 2
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.2.2
  Built: 0
  BuiltTime: Thu Jan  1 01:00:00 1970
  GitCommit: ""
  GoVersion: go1.22.7
  Os: linux
  OsArch: linux/amd64
  Version: 5.2.2

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@PHHENS PHHENS added the kind/bug Categorizes issue or PR as related to a bug. label Sep 22, 2024
@Luap99
Copy link
Member

Luap99 commented Sep 23, 2024

We do have events for network connect/disconnect. The fact that we do have have them for create/remove seems like an oversight.

@Luap99 Luap99 added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Sep 23, 2024
@baude
Copy link
Member

baude commented Sep 25, 2024

we have always been hesitant to do this due to "event fatigue". But agree with @Luap99 , it makes sense for certain.

@PHHENS
Copy link
Author

PHHENS commented Sep 26, 2024 via email

@Sativarsainath-26
Copy link
Contributor

Sativarsainath-26 commented Sep 30, 2024

I would like to work on this issue 👀 .

@rhatdan
Copy link
Member

rhatdan commented Sep 30, 2024

Thanks @Sativarsainath-26 It is all yours.

Copy link

A friendly reminder that this issue had no activity for 30 days.

Sativarsainath-26 added a commit to Sativarsainath-26/podman that referenced this issue Oct 31, 2024
…dman events

Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
Sativarsainath-26 added a commit to Sativarsainath-26/podman that referenced this issue Oct 31, 2024
…dman events

Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
Sativarsainath-26 added a commit to Sativarsainath-26/podman that referenced this issue Oct 31, 2024
…dman events

Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
@Luap99 Luap99 removed the stale-issue label Nov 1, 2024
Sativarsainath-26 added a commit to Sativarsainath-26/podman that referenced this issue Nov 1, 2024
This commit resolves an issue where network creation and removal events were not being logged in `podman events`. A new function has been introduced in the `events` package to ensure consistent logging of network lifecycle events. This update will allow users to track network operations more effectively through the event log, improving visibility and aiding in debugging network-related issues.

Fixes: containers#24032
Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Feb 5, 2025
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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.

5 participants