Vendoring libnetwork to avoid a deadlock
Signed-off-by: Madhu Venugopal <madhu@docker.com> (cherry picked from commit 4f369a74fac5023e9a46de4b4dbe121a7c2b2c81) Upstream-commit: 61e59693dc3407ba1d68f8a5be17c117a96467e4 Component: engine
This commit is contained in:
@ -702,12 +702,13 @@ func (n *network) driver(load bool) (driverapi.Driver, error) {
|
||||
}
|
||||
|
||||
c := n.getController()
|
||||
isAgent := c.isAgent()
|
||||
n.Lock()
|
||||
// If load is not required, driver, cap and err may all be nil
|
||||
if cap != nil {
|
||||
n.scope = cap.DataScope
|
||||
}
|
||||
if c.isAgent() || n.dynamic {
|
||||
if isAgent || n.dynamic {
|
||||
// If we are running in agent mode then all networks
|
||||
// in libnetwork are local scope regardless of the
|
||||
// backing driver.
|
||||
|
||||
Reference in New Issue
Block a user