Remove subprocess for changing netns
Now that Go 1.10 has removed the issue which made us do this.
This commit is contained in:
1 parent
ba578c91a7
commit
c2c14410d2
7 files changed
+77
-224
No files matched your search
@@ -49,7 +49,9 @@ func (w *watcher) ContainerStarted(id string) {
|
||||
rootDir = "/host"
|
||||
}
|
||||
netNSPath := weavenet.NSPathByPidWithRoot(rootDir, info.State.Pid)
|
||||
if _, err := weavenet.WithNetNS(netNSPath, "configure-arp", weavenet.VethName, rootDir); err != nil {
|
||||
if err := weavenet.WithNetNSByPath(netNSPath, func() error {
|
||||
return weavenet.ConfigureArp(weavenet.VethName, rootDir)
|
||||
}); err != nil {
|
||||
w.driver.warn("ContainerStarted", "unable to configure interfaces: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user