diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-16 10:48:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 10:48:22 +0200 |
commit | 7b54aeb6e3dca3511daa1e511625f7e446fbc710 (patch) | |
tree | cf3fcb9b54704a7739dc0a3d6dc541ab3630ba81 /libpod/networking_linux.go | |
parent | 1137c1084b960c9d186cdf8276121658c33a1a56 (diff) | |
parent | f10f9bc58fa0a8863aa2502221795b69e7b8bd0e (diff) | |
download | podman-7b54aeb6e3dca3511daa1e511625f7e446fbc710.tar.gz podman-7b54aeb6e3dca3511daa1e511625f7e446fbc710.tar.bz2 podman-7b54aeb6e3dca3511daa1e511625f7e446fbc710.zip |
Merge pull request #4272 from baude/rootlesstatsnet
rootless v2 cannot collect network stats
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r-- | libpod/networking_linux.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 8181cbc8a..4360c8c15 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -462,6 +462,12 @@ func getContainerNetNS(ctr *Container) (string, error) { 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() { + return netStats, nil + } netNSPath, netPathErr := getContainerNetNS(ctr) if netPathErr != nil { return nil, netPathErr |