Don't assume we always run in in host pid space

Pass the path to the proc filesystem down
This commit is contained in:
Bryan Boreham committed 2017-04-17 19:41:47 +00:00
1 parent c8e0c12d34
commit f05bb6c4e0
7 files changed
+29 -22

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ func (w *watcher) ContainerStarted(id string) {
rootDir = "/host"
}
netNSPath := weavenet.NSPathByPidWithRoot(rootDir, info.State.Pid)
if _, err := weavenet.WithNetNS(netNSPath, "configure-arp", weavenet.VethName); err != nil {
if _, err := weavenet.WithNetNS(netNSPath, "configure-arp", weavenet.VethName, rootDir); err != nil {
w.driver.warn("ContainerStarted", "unable to configure interfaces: %s", err)
}
}