podman: podman inspect network doesn't include running containers
/kind bug
Description
podman network inspect doesn’t include containers using the network
Steps to reproduce the issue:
-
Create network
podman network create -
Start container
podman run -it --network podman1 alpine -
Inspect network
podman inspect podman1
Describe the results you received:
podman inspect podman1 does not contain a list of containers using the network.
Describe the results you expected:
Same command in docker contains a list of containers.
"Containers": {
"bb522a1964c46b2970aa825cafce1bf2e971e195ad5b9784bb5bd13d53737e9d": {
"Name": "elated_montalcini",
"EndpointID": "08397fd8bb4e9c80a37b2bfb8f259c23181374dac2a0e1febcffcdc4d89bc32c",
"MacAddress": "02:42:ac:1b:00:02",
"IPv4Address": "172.27.0.2/16",
"IPv6Address": ""
}
}
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Client: Podman Engine
Version: 4.0.3
API Version: 4.0.3
Go Version: go1.18
Built: Fri Apr 1 16:28:59 2022
OS/Arch: darwin/arm64
Server: Podman Engine
Version: 4.0.3
API Version: 4.0.3
Go Version: go1.18
Built: Fri Apr 1 19:22:39 2022
OS/Arch: linux/arm64
Output of podman info --debug:
host:
arch: arm64
buildahVersion: 1.24.3
cgroupControllers:
- cpuset
- cpu
- io
- memory
- pids
- misc
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.0-2.fc36.aarch64
path: /usr/bin/conmon
version: 'conmon version 2.1.0, commit: '
cpus: 4
distribution:
distribution: fedora
variant: coreos
version: "36"
eventLogger: journald
hostname: localhost.localdomain
idMappings:
gidmap: null
uidmap: null
kernel: 5.17.3-300.fc36.aarch64
linkmode: dynamic
logDriver: journald
memFree: 7293345792
memTotal: 8304160768
networkBackend: netavark
ociRuntime:
name: crun
package: crun-1.4.4-1.fc36.aarch64
path: /usr/bin/crun
version: |-
crun version 1.4.4
commit: 6521fcc5806f20f6187eb933f9f45130c86da230
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
remoteSocket:
exists: true
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
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: true
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.2.0-0.2.beta.0.fc36.aarch64
version: |-
slirp4netns version 1.2.0-beta.0
commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
libslirp: 4.6.1
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.5.3
swapFree: 0
swapTotal: 0
uptime: 3h 25m 5.43s (Approximately 0.12 days)
plugins:
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
volume:
- local
registries:
search:
- docker.io
store:
configFile: /usr/share/containers/storage.conf
containerStore:
number: 2
paused: 0
running: 0
stopped: 2
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"
imageCopyTmpDir: /var/tmp
imageStore:
number: 9
runRoot: /run/containers/storage
volumePath: /var/lib/containers/storage/volumes
version:
APIVersion: 4.0.3
Built: 1648837359
BuiltTime: Fri Apr 1 19:22:39 2022
GitCommit: ""
GoVersion: go1.18
OsArch: linux/arm64
Version: 4.0.3
Package info (e.g. output of rpm -q podman or apt list podman):
brew info podman
podman: stable 4.0.3 (bottled), HEAD
Tool for managing OCI containers and pods
https://podman.io/
/opt/homebrew/Cellar/podman/4.0.3 (172 files, 46.2MB) *
Poured from bottle on 2022-05-05 at 08:20:47
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/podman.rb
License: Apache-2.0
==> Dependencies
Build: go ✔, go-md2man ✘
Required: qemu ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions
==> Analytics
install: 17,297 (30 days), 48,514 (90 days), 131,788 (365 days)
install-on-request: 17,297 (30 days), 48,499 (90 days), 131,766 (365 days)
build-error: 1 (30 days)
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Macbook M1 installed with homebrew
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 19 (13 by maintainers)
we really do try on the compatibility stuff. in this case, the easy button just won’t work … but if you look at my update, i committed to trying it a different way. I have the code all written and it works, so not far away.
You can get this with
podman ps --filter network=namethis is a duplicate of a jira card i was working on. the code is done but the problem is that would be a breaking change on output. we discussed podman 5, but i also would like to go back and look at things to see if i can weasel it in without breaking changes.