keep old network ids
for windows all networks are re-populated in the store during network controller initialization. In current version it also regenerate network Ids which may be referenced by other components and it may cause broken references to a networks. This commit avoids regeneration of network ids. Signed-off-by: Andrey Kolomentsev <andrey.kolomentsev@docker.com>
This commit is contained in:
parent
de86ba27fb
commit
e017717d96
|
@ -346,8 +346,10 @@ func (daemon *Daemon) initNetworkController(config *config.Config, activeSandbox
|
||||||
controller.WalkNetworks(s)
|
controller.WalkNetworks(s)
|
||||||
|
|
||||||
drvOptions := make(map[string]string)
|
drvOptions := make(map[string]string)
|
||||||
|
nid := ""
|
||||||
if n != nil {
|
if n != nil {
|
||||||
|
nid = n.ID()
|
||||||
|
|
||||||
// global networks should not be deleted by local HNS
|
// global networks should not be deleted by local HNS
|
||||||
if n.Info().Scope() == datastore.GlobalScope {
|
if n.Info().Scope() == datastore.GlobalScope {
|
||||||
continue
|
continue
|
||||||
|
@ -392,7 +394,7 @@ func (daemon *Daemon) initNetworkController(config *config.Config, activeSandbox
|
||||||
}
|
}
|
||||||
|
|
||||||
v6Conf := []*libnetwork.IpamConf{}
|
v6Conf := []*libnetwork.IpamConf{}
|
||||||
_, err := controller.NewNetwork(strings.ToLower(v.Type), name, "",
|
_, err := controller.NewNetwork(strings.ToLower(v.Type), name, nid,
|
||||||
libnetwork.NetworkOptionGeneric(options.Generic{
|
libnetwork.NetworkOptionGeneric(options.Generic{
|
||||||
netlabel.GenericData: netOption,
|
netlabel.GenericData: netOption,
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue