浏览代码

Ignore HNS networks with type Private

Fix #33052 (workaround style)

**- What I did**

HNS reports networks that don't have anything to do with the Daemon, and
for which no networking plugin is available. This make the Daemon start
sequence pause for 15 secs, as the plugin resolving logic has a wait &
retry logic

**- How I did it**

Just after retrieving the HNS networks, I filter out those with type
`Private`

**- How to verify it**

Replace dockerd coming with Docker for Windows from one built from this
PR. Windows containers daemon should now launch pretty quickly

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Simon Ferquel 8 年之前
父节点
当前提交
b91fd26bb5
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      daemon/daemon_windows.go

+ 3 - 0
daemon/daemon_windows.go

@@ -327,6 +327,9 @@ func (daemon *Daemon) initNetworkController(config *config.Config, activeSandbox
 	// discover and add HNS networks to windows
 	// network that exist are removed and added again
 	for _, v := range hnsresponse {
+		if strings.ToLower(v.Type) == "private" {
+			continue // workaround for HNS reporting unsupported networks
+		}
 		var n libnetwork.Network
 		s := func(current libnetwork.Network) bool {
 			options := current.Info().DriverOptions()