Merge pull request #149 from thaJeztah/18.09_backport_fix_restart
[18.09 backport] keep old network ids Upstream-commit: 9dc0488d1c0f424368cf8af56006acc46a846679 Component: engine
This commit is contained in:
@@ -343,8 +343,10 @@ func (daemon *Daemon) initNetworkController(config *config.Config, activeSandbox
|
||||
controller.WalkNetworks(s)
|
||||
|
||||
drvOptions := make(map[string]string)
|
||||
|
||||
nid := ""
|
||||
if n != nil {
|
||||
nid = n.ID()
|
||||
|
||||
// global networks should not be deleted by local HNS
|
||||
if n.Info().Scope() == datastore.GlobalScope {
|
||||
continue
|
||||
@@ -389,7 +391,7 @@ func (daemon *Daemon) initNetworkController(config *config.Config, activeSandbox
|
||||
}
|
||||
|
||||
v6Conf := []*libnetwork.IpamConf{}
|
||||
_, err := controller.NewNetwork(strings.ToLower(v.Type), name, "",
|
||||
_, err := controller.NewNetwork(strings.ToLower(v.Type), name, nid,
|
||||
libnetwork.NetworkOptionGeneric(options.Generic{
|
||||
netlabel.GenericData: netOption,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user