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

Swarmkit has enabled the plugin filtering logic based on the drivers

returned in "docker info". Currently info endpoint isnt using the
GetAllByCap, but relies on existing networks to get the plugin names.
This causes a basic issue when it comes to global network plugins which
swarm-mode relies on, wherein swarmkit will not be able to schedule the
network on the worker nodes due to the filtering logic.

In order to break this chicken & egg issue, we must start to use the
GetAllManagedPluginsByCap. We are unable to use GetAllByCap due to
various issues with Plugin-V1's lazy loading approach causing issues
especially during daemon restarts (which uses SystemInfo)

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2017-01-04 12:38:14 -08:00
parent 6129e6ce3e
commit 6aaa85f0b0

View file

@ -407,6 +407,13 @@ func (daemon *Daemon) GetNetworkDriverList() []string {
} }
pluginList := daemon.netController.BuiltinDrivers() pluginList := daemon.netController.BuiltinDrivers()
managedPlugins := daemon.PluginStore.GetAllManagedPluginsByCap(driverapi.NetworkPluginEndpointType)
for _, plugin := range managedPlugins {
pluginList = append(pluginList, plugin.Name())
}
pluginMap := make(map[string]bool) pluginMap := make(map[string]bool)
for _, plugin := range pluginList { for _, plugin := range pluginList {
pluginMap[plugin] = true pluginMap[plugin] = true