mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38580 from andrey-ko/fix-restart
Pass in network IDs during restart
This commit is contained in:
commit
611b23c1a0
1 changed files with 4 additions and 2 deletions
|
@ -346,8 +346,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
|
||||
|
@ -392,7 +394,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,
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue