1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #30038 from tonistiigi/setclusterprovider

[v1.13] Add workaround for possible SetClusterProvider deadlock
This commit is contained in:
Victor Vieux 2017-01-24 16:13:20 -08:00 committed by GitHub
commit b60f411292

View file

@ -449,7 +449,9 @@ func (daemon *Daemon) registerLink(parent, child *container.Container, alias str
// SetClusterProvider sets a component for querying the current cluster state. // SetClusterProvider sets a component for querying the current cluster state.
func (daemon *Daemon) SetClusterProvider(clusterProvider cluster.Provider) { func (daemon *Daemon) SetClusterProvider(clusterProvider cluster.Provider) {
daemon.clusterProvider = clusterProvider daemon.clusterProvider = clusterProvider
daemon.netController.SetClusterProvider(clusterProvider) // call this in a goroutine to allow netcontroller handle this event async
// and not block if it is in the middle of talking with cluster
go daemon.netController.SetClusterProvider(clusterProvider)
} }
// IsSwarmCompatible verifies if the current daemon // IsSwarmCompatible verifies if the current daemon