فهرست منبع

Removing the override for ipamdriver for local scope networks

The commit contains fix for the issue reported in
https://github.com/moby/moby/issues/33415 and
https://github.com/docker/libnetwork/issues/1772. With the
feature introduced to support local scope networks in swarm
mode the network configuration to include ipam driver was overriden
in libnetwork. This has been removed with this fix which will allow
ipam-driver option to be used for task allocation

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Abhinandan Prativadi 8 سال پیش
والد
کامیت
26fb58d3a8
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 0 1
      libnetwork/controller.go
  2. 3 0
      libnetwork/network.go

+ 0 - 1
libnetwork/controller.go

@@ -738,7 +738,6 @@ func (c *controller) NewNetwork(networkType, name string, id string, options ...
 	if network.configOnly {
 		network.scope = datastore.LocalScope
 		network.networkType = "null"
-		network.ipamType = ""
 		goto addToStore
 	}
 

+ 3 - 0
libnetwork/network.go

@@ -412,6 +412,9 @@ func (n *network) applyConfigurationTo(to *network) error {
 			}
 		}
 	}
+	if len(n.ipamType) != 0 {
+		to.ipamType = n.ipamType
+	}
 	if len(n.ipamOptions) > 0 {
 		to.ipamOptions = make(map[string]string, len(n.ipamOptions))
 		for k, v := range n.ipamOptions {