Endpoint interface stats read fails when invoked from docker
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 <5bd2eb5b6f60921d9a2b9cb6a0a86bb947f3d361@docker.com>

frntn/libnetwork,abhi/libnetwork,amitkris/libnetwork,rogaha/libnetwork,allencloud/libnetwork,ityangchen/libnetwork,WeiZhang555/libnetwork,cloudflare/libnetwork,carlye566/libnetwork,jimmycmh/libnetwork,vijayendrabvs/libnetwork,carlye566/libnetwork_eric,mountkin/libnetwork,hw-qiaolei/libnetwork,abhi/libnetwork,tgraf/libnetwork,cpuguy83/libnetwork,frntn/libnetwork,medallia/libnetwork,fcrisciani/libnetwork,hw-qiaolei/libnetwork,aboch/libnetwork_new,kolyshkin/libnetwork,msabansal/libnetwork,jvinod/libnetwork,medallia/libnetwork,aboch/libnetwork_new,kolyshkin/libnetwork,YujiOshima/libnetwork,carlye566/libnetwork_eric,dcbw/libnetwork,vdemeester/libnetwork,kunalkushwaha/libnetwork,brahmaroutu/libnetwork,AdoHe/libnetwork,djones-skytap/libnetwork,abronan/libnetwork,clnperez/libnetwork,kolyshkin/libnetwork,tgraf/libnetwork,djones-skytap/libnetwork,wulonghui/libnetwork,mavenugo/libnetwork,mbanikazemi/libnetwork,anshulr/libnetwork,argvader/libnetwork,sharmasushant/libnetwork,tmakita/libnetwork,tangkun75/libnetwork,docker/libnetwork,medallia/libnetwork,vdemeester/libnetwork,dcbw/libnetwork,lindenlab/libnetwork,junxu/libnetwork,mahak/libnetwork,cpuguy83/libnetwork,axsh/libnetwork,sharmasushant/libnetwork,anarcher/libnetwork,carlye566/libnetwork,runcom/libnetwork,sainath14/libnetwork,curtiszimmerman/libnetwork,lindenlab/libnetwork,axsh/libnetwork,coolljt0725/libnetwork,mapuri/libnetwork,amitkris/libnetwork,curtiszimmerman/libnetwork,AdoHe/libnetwork,mahak/libnetwork,mYmNeo/libnetwork,allencloud/libnetwork,junxu/libnetwork,mapuri/libnetwork,tangkun75/libnetwork,fcrisciani/libnetwork,anortef/libnetwork,mahak/libnetwork,bprashanth/libnetwork,sanimej/libnetwork,argvader/libnetwork,abhi/libnetwork,mbanikazemi/libnetwork,thockin/libnetwork,YujiOshima/libnetwork,wulonghui/libnetwork,jvinod/libnetwork,hackersdotmu/libnetwork,jmzwcn/libnetwork,pyakpyak/libnetwork,wcwxyz/libnetwork,kunalkushwaha/libnetwork,brahmaroutu/libnetwork,anortef/libnetwork,vdemeester/libnetwork,minhoryang/libnetwork,docker/libnetwork,jmzwcn/libnetwork,vijayendrabvs/libnetwork,ityangchen/libnetwork,abronan/libnetwork,clnperez/libnetwork,wcwxyz/libnetwork,WeiZhang555/libnetwork,msagheer/libnetwork,jimmycmh/libnetwork,anshulr/libnetwork,runcom/libnetwork,cloudflare/libnetwork,msabansal/libnetwork,msagheer/libnetwork,mavenugo/libnetwork,thockin/libnetwork,rogaha/libnetwork,pyakpyak/libnetwork,docker/libnetwork,kvasdopil/libnetwork,sanimej/libnetwork,hackersdotmu/libnetwork,minhoryang/libnetwork,mYmNeo/libnetwork,sainath14/libnetwork,coolljt0725/libnetwork,anarcher/libnetwork,bprashanth/libnetwork,mountkin/libnetwork,kvasdopil/libnetwork,tmakita/libnetwork