mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #24431 from mavenugo/revert
Check for swarm-mode network conflict during create network
This commit is contained in:
commit
e10c11e4a1
1 changed files with 0 additions and 10 deletions
|
@ -292,10 +292,6 @@ func (daemon *Daemon) UpdateContainerServiceConfig(containerName string, service
|
|||
return nil
|
||||
}
|
||||
|
||||
func errClusterNetworkConnect() error {
|
||||
return fmt.Errorf("cannot connect or disconnect managed containers on a network")
|
||||
}
|
||||
|
||||
// ConnectContainerToNetwork connects the given container to the given
|
||||
// network. If either cannot be found, an err is returned. If the
|
||||
// network cannot be set up, an err is returned.
|
||||
|
@ -304,9 +300,6 @@ func (daemon *Daemon) ConnectContainerToNetwork(containerName, networkName strin
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if container.Managed {
|
||||
return errClusterNetworkConnect()
|
||||
}
|
||||
return daemon.ConnectToNetwork(container, networkName, endpointConfig)
|
||||
}
|
||||
|
||||
|
@ -320,9 +313,6 @@ func (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, netwo
|
|||
}
|
||||
return err
|
||||
}
|
||||
if container.Managed {
|
||||
return errClusterNetworkConnect()
|
||||
}
|
||||
return daemon.DisconnectFromNetwork(container, network, force)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue