Merge pull request #25191 from mavenugo/1.12.dl

Vendoring libnetwork to 1.12.0-bump branch to avoid a deadlock
This commit is contained in:
Tibor Vass 2016-07-28 13:59:20 -07:00 committed by GitHub
commit 3c292b6d92
2 changed files with 3 additions and 2 deletions

View file

@ -65,7 +65,7 @@ clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837
clone git github.com/imdario/mergo 0.2.1 clone git github.com/imdario/mergo 0.2.1
#get libnetwork packages #get libnetwork packages
clone git github.com/docker/libnetwork 443b7be96fdf0ed8f65ec92953aa8df4f9a725dc clone git github.com/docker/libnetwork 5e7bf83ab07c197d1bef6ec073d9f19ce59e3eb2
clone git github.com/docker/go-events afb2b9f2c23f33ada1a22b03651775fdc65a5089 clone git github.com/docker/go-events afb2b9f2c23f33ada1a22b03651775fdc65a5089
clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec

View file

@ -702,12 +702,13 @@ func (n *network) driver(load bool) (driverapi.Driver, error) {
} }
c := n.getController() c := n.getController()
isAgent := c.isAgent()
n.Lock() n.Lock()
// If load is not required, driver, cap and err may all be nil // If load is not required, driver, cap and err may all be nil
if cap != nil { if cap != nil {
n.scope = cap.DataScope n.scope = cap.DataScope
} }
if c.isAgent() || n.dynamic { if isAgent || n.dynamic {
// If we are running in agent mode then all networks // If we are running in agent mode then all networks
// in libnetwork are local scope regardless of the // in libnetwork are local scope regardless of the
// backing driver. // backing driver.