Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Go to file
Alessandro Boch a3879fc169 Endpoint interface stats read fails when invoked from docker
- When invoked from docker, endpoint.Statistics() returns
  the statistics of the host's interfaces.

  Issue is tracked down to ioutil.ReadFile(). For some
  reason even if invoked from inside the sandbox netns,
  it ends up reading the stats file from the default netns,
  when invoked from docker.
  If same operation is run from inside a dedicated binary,
  it works as expected.

- Replacing it with exec.Command("cat", <file>) solves the issue

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-29 20:29:41 -07:00
libnetwork Endpoint interface stats read fails when invoked from docker 2015-06-29 20:29:41 -07:00