diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-08 13:08:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 13:08:05 -0500 |
commit | 47d2a4be2af5143c9619a65ec641daa1025130a3 (patch) | |
tree | 981e5617c0233441520a4aefb48843143597df26 /libpod/networking_linux.go | |
parent | 3bf02fb00a6ef23a55f818198107cf468b45ccf5 (diff) | |
parent | 46337b4708362e9fe2915c7efddc353d88a2cb5e (diff) | |
download | podman-47d2a4be2af5143c9619a65ec641daa1025130a3.tar.gz podman-47d2a4be2af5143c9619a65ec641daa1025130a3.tar.bz2 podman-47d2a4be2af5143c9619a65ec641daa1025130a3.zip |
Merge pull request #8648 from mheon/fix_7883
Make `podman stats` slirp check more robust
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r-- | libpod/networking_linux.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 2171a9208..bf27989bf 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -900,10 +900,9 @@ func (r *Runtime) reloadContainerNetwork(ctr *Container) ([]*cnitypes.Result, er func getContainerNetIO(ctr *Container) (*netlink.LinkStatistics, error) { var netStats *netlink.LinkStatistics - // rootless v2 cannot seem to resolve its network connection to - // collect statistics. For now, we allow stats to at least run - // by returning nil - if rootless.IsRootless() { + // With slirp4netns, we can't collect statistics at present. + // For now, we allow stats to at least run by returning nil + if rootless.IsRootless() || ctr.config.NetMode.IsSlirp4netns() { return netStats, nil } netNSPath, netPathErr := getContainerNetNS(ctr) |