Move port-mapping ownership closer to Sandbox (from Endpoint)
https://github.com/docker/libnetwork/pull/810 provides the more complete solution for moving the Port-mapping ownership away from endpoint and into Sandbox. But, this PR makes the best use of existing libnetwork design and get a step closer to the gaol. Signed-off-by: Madhu Venugopal <madhu@docker.com> Upstream-commit: e38463b2779f455b4173171d5a1fdb115180a7e9 Component: engine
This commit is contained in:
@@ -775,7 +775,8 @@ func (daemon *Daemon) connectToNetwork(container *container.Container, idOrName
|
||||
|
||||
controller := daemon.netController
|
||||
|
||||
createOptions, err := container.BuildCreateEndpointOptions(n, endpointConfig)
|
||||
sb := daemon.getNetworkSandbox(container)
|
||||
createOptions, err := container.BuildCreateEndpointOptions(n, endpointConfig, sb)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -801,7 +802,6 @@ func (daemon *Daemon) connectToNetwork(container *container.Container, idOrName
|
||||
return err
|
||||
}
|
||||
|
||||
sb := daemon.getNetworkSandbox(container)
|
||||
if sb == nil {
|
||||
options, err := daemon.buildSandboxOptions(container, n)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user