Skip to content

Commit

Permalink
Vendoring libnetwork
Browse files Browse the repository at this point in the history
Signed-off-by: Madhu Venugopal <madhu@docker.com>
  • Loading branch information
mavenugo committed Jul 12, 2016
1 parent b91e2dd commit 92c40f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hack/vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837
clone git github.com/imdario/mergo 0.2.1

#get libnetwork packages
clone git github.com/docker/libnetwork 6eece7dcc21dcd34d907f3e91dd71cb8640b661c
clone git github.com/docker/libnetwork 9b821dc123ca07e2c4d7244943f4e3e9632904fb
clone git github.com/docker/go-events 39718a26497694185f8fb58a7d6f31947f3dc42d
clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
Expand Down
3 changes: 2 additions & 1 deletion vendor/src/github.com/docker/libnetwork/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ func (n *network) CopyTo(o datastore.KVObject) error {
dstN.id = n.id
dstN.networkType = n.networkType
dstN.scope = n.scope
dstN.dynamic = n.dynamic
dstN.ipamType = n.ipamType
dstN.enableIPv6 = n.enableIPv6
dstN.persist = n.persist
Expand Down Expand Up @@ -706,7 +707,7 @@ func (n *network) driver(load bool) (driverapi.Driver, error) {
if cap != nil {
n.scope = cap.DataScope
}
if c.isAgent() {
if c.isAgent() || n.dynamic {
// If we are running in agent mode then all networks
// in libnetwork are local scope regardless of the
// backing driver.
Expand Down
4 changes: 4 additions & 0 deletions vendor/src/github.com/docker/libnetwork/networkdb/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ func (nDB *NetworkDB) bulkSync(nid string, nodes []string, all bool) ([]string,
nodes = nDB.mRandomNodes(1, nodes)
}

if len(nodes) == 0 {
return nil, nil
}

logrus.Debugf("%s: Initiating bulk sync with nodes %v", nDB.config.NodeName, nodes)
var err error
var networks []string
Expand Down

0 comments on commit 92c40f9

Please sign in to comment.