Skip to content

Commit

Permalink
Merge pull request #1773 from sanimej/vxlanid
Browse files Browse the repository at this point in the history
On leader switchover preserve the vxlan id for existing networks
  • Loading branch information
aaronlehmann authored Nov 29, 2016
2 parents 2422b48 + c803824 commit 6bb831f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions manager/allocator/networkallocator/networkallocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,18 @@ func (na *NetworkAllocator) allocateDriverState(n *api.Network) error {
return err
}

var options map[string]string
options := make(map[string]string)
// reconcile the driver specific options from the network spec
// and from the operational state retrieved from the store
if n.Spec.DriverConfig != nil {
options = n.Spec.DriverConfig.Options
for k, v := range n.Spec.DriverConfig.Options {
options[k] = v
}
}
if n.DriverState != nil {
for k, v := range n.DriverState.Options {
options[k] = v
}
}

// Construct IPAM data for driver consumption.
Expand Down

0 comments on commit 6bb831f

Please sign in to comment.