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>
| ... | ... |
@@ -407,6 +407,13 @@ func (daemon *Daemon) GetNetworkDriverList() []string {
|
| 407 | 407 |
} |
| 408 | 408 |
|
| 409 | 409 |
pluginList := daemon.netController.BuiltinDrivers() |
| 410 |
+ |
|
| 411 |
+ managedPlugins := daemon.PluginStore.GetAllManagedPluginsByCap(driverapi.NetworkPluginEndpointType) |
|
| 412 |
+ |
|
| 413 |
+ for _, plugin := range managedPlugins {
|
|
| 414 |
+ pluginList = append(pluginList, plugin.Name()) |
|
| 415 |
+ } |
|
| 416 |
+ |
|
| 410 | 417 |
pluginMap := make(map[string]bool) |
| 411 | 418 |
for _, plugin := range pluginList {
|
| 412 | 419 |
pluginMap[plugin] = true |