Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[18.09 backport] keep old network ids #149

Merged
merged 1 commit into from Feb 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions daemon/daemon_windows.go
Expand Up @@ -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
Expand Down Expand Up @@ -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,
}),
Expand Down