refactor: supply /proc path to CreateAndAttachVeth()

Move the assumptions about where we're running up towards the caller.
This commit is contained in:
Bryan Boreham committed 2020-05-14 10:21:09 +00:00
1 parent 2f235daa1c
commit 0f3864968e
3 files changed
+20 -18

No files matched your search

+1 -1
View File
@@ -134,7 +134,7 @@ func (driver *driver) CreateEndpoint(create *api.CreateEndpointRequest) (*api.Cr
// create veths. note we assume endpoint IDs are unique in the first 9 chars
name, peerName := vethPair(create.EndpointID)
if _, err := weavenet.CreateAndAttachVeth(name, peerName, weavenet.WeaveBridgeName, 0, false, true, nil); err != nil {
if _, err := weavenet.CreateAndAttachVeth("/proc", name, peerName, weavenet.WeaveBridgeName, 0, false, true, nil); err != nil {
return nil, driver.error("JoinEndpoint", "%s", err)
}