Skip to content

Commit

Permalink
Merge pull request #2146 from ctelfer/fix-overlay-vxlan-races
Browse files Browse the repository at this point in the history
Fix overlay vxlan races
  • Loading branch information
Flavio Crisciani authored Jul 11, 2018
2 parents 3bcb945 + 5d113d1 commit 206ed7f
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 103 deletions.
10 changes: 1 addition & 9 deletions drivers/overlay/joinleave.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,10 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo,
return fmt.Errorf("couldn't get vxlan id for %q: %v", s.subnetIP.String(), err)
}

if err := n.joinSandbox(false); err != nil {
if err := n.joinSandbox(s, false, true); err != nil {
return fmt.Errorf("network sandbox join failed: %v", err)
}

if err := n.joinSubnetSandbox(s, false); err != nil {
return fmt.Errorf("subnet sandbox join failed for %q: %v", s.subnetIP.String(), err)
}

// joinSubnetSandbox gets called when an endpoint comes up on a new subnet in the
// overlay network. Hence the Endpoint count should be updated outside joinSubnetSandbox
n.incEndpointCount()

sbox := n.sandbox()

overlayIfName, containerIfName, err := createVethPair()
Expand Down
Loading

0 comments on commit 206ed7f

Please sign in to comment.