1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

5 commits

Author SHA1 Message Date
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
Alessandro Boch
5ac330aca2 Endpoint to expose interfaces' statistics
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-29 16:15:31 -07:00
Jana Radhakrishnan
aac063b4b6 Add neighbor support to sandbox
Add support to add/delete neighbor entries to
the sandbox. Both L3 and L2(fdb) neighbor table additions
are supported.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-18 15:07:17 -07:00
Jana Radhakrishnan
4ceec05f1b Add support to add bridge to the sandbox.
Added support to add a bridge the same way as any other
interface into the namespace. The only difference is linux
does not support creating the bridge in one namespace and
moving it into another namespace. So for a bridge the sandbox
code also does the creation of the bridge inside the sandbox.
Also added an optional argument to interface which can now
select one of the already existing interfaces as it's master.
For this option to succeed the master interface should be of type
bridge.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-08 10:21:00 -07:00
Jana Radhakrishnan
f5c1c78179 Refactor sandbox code to use interfaces
Currently sandbox code exposes bare structs
externally to the package. It is untenable
to continue this way and it becomes too
inflexible to use it to store internal state.
Changed all of them to use interfaces.
Also cleaned up a lot of boiler plate code
which needs to set into namespace.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-08 10:17:56 -07:00