mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
This commit is contained in:
parent
430367de2d
commit
26fb58d3a8
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue