mirror of https://github.com/vishvananda/netns
Fixed the docker netns detection err on xenial (#15)
With ubuntu 16.04 and docker-engine 1.11, the docker netns detection function failed to look for the correct location of task file. This change fixed the issue. Signed-off-by: Zhenfang Wei <kopkop@gmail.com>
This commit is contained in:
parent
003a74c01d
commit
11c323fbd3
|
@ -182,6 +182,8 @@ func getPidForContainer(id string) (int, error) {
|
||||||
filepath.Join(cgroupRoot, cgroupThis, "docker", id, "tasks"),
|
filepath.Join(cgroupRoot, cgroupThis, "docker", id, "tasks"),
|
||||||
// Even more recent docker versions under systemd use docker-<id>.scope/
|
// Even more recent docker versions under systemd use docker-<id>.scope/
|
||||||
filepath.Join(cgroupRoot, "system.slice", "docker-"+id+".scope", "tasks"),
|
filepath.Join(cgroupRoot, "system.slice", "docker-"+id+".scope", "tasks"),
|
||||||
|
// Even more recent docker versions under cgroup/systemd/docker/<id>/
|
||||||
|
filepath.Join(cgroupRoot, "..", "systemd", "docker", id, "tasks"),
|
||||||
}
|
}
|
||||||
|
|
||||||
var filename string
|
var filename string
|
||||||
|
|
Loading…
Reference in New Issue