Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -444,11 +444,6 @@ func (container *Container) TmpfsMounts() ([]Mount, error) {
|
| 444 | 444 |
return mounts, nil |
| 445 | 445 |
} |
| 446 | 446 |
|
| 447 |
-// EnableServiceDiscoveryOnDefaultNetwork Enable service discovery on default network |
|
| 448 |
-func (container *Container) EnableServiceDiscoveryOnDefaultNetwork() bool {
|
|
| 449 |
- return false |
|
| 450 |
-} |
|
| 451 |
- |
|
| 452 | 447 |
// GetMountPoints gives a platform specific transformation to types.MountPoint. Callers must hold a Container lock. |
| 453 | 448 |
func (container *Container) GetMountPoints() []types.MountPoint {
|
| 454 | 449 |
mountPoints := make([]types.MountPoint, 0, len(container.MountPoints)) |
| ... | ... |
@@ -182,11 +182,6 @@ func (container *Container) BuildHostnameFile() error {
|
| 182 | 182 |
return nil |
| 183 | 183 |
} |
| 184 | 184 |
|
| 185 |
-// EnableServiceDiscoveryOnDefaultNetwork Enable service discovery on default network |
|
| 186 |
-func (container *Container) EnableServiceDiscoveryOnDefaultNetwork() bool {
|
|
| 187 |
- return true |
|
| 188 |
-} |
|
| 189 |
- |
|
| 190 | 185 |
// GetMountPoints gives a platform specific transformation to types.MountPoint. Callers must hold a Container lock. |
| 191 | 186 |
func (container *Container) GetMountPoints() []types.MountPoint {
|
| 192 | 187 |
mountPoints := make([]types.MountPoint, 0, len(container.MountPoints)) |
| ... | ... |
@@ -657,7 +657,7 @@ func (daemon *Daemon) updateNetworkConfig(container *container.Container, n libn |
| 657 | 657 |
if hasUserDefinedIPAddress(endpointConfig) && !enableIPOnPredefinedNetwork() {
|
| 658 | 658 |
return runconfig.ErrUnsupportedNetworkAndIP |
| 659 | 659 |
} |
| 660 |
- if endpointConfig != nil && len(endpointConfig.Aliases) > 0 && !container.EnableServiceDiscoveryOnDefaultNetwork() {
|
|
| 660 |
+ if endpointConfig != nil && len(endpointConfig.Aliases) > 0 && !serviceDiscoveryOnDefaultNetwork() {
|
|
| 661 | 661 |
return runconfig.ErrUnsupportedNetworkAndAlias |
| 662 | 662 |
} |
| 663 | 663 |
} else {
|
| ... | ... |
@@ -368,6 +368,11 @@ func enableIPOnPredefinedNetwork() bool {
|
| 368 | 368 |
return false |
| 369 | 369 |
} |
| 370 | 370 |
|
| 371 |
+// serviceDiscoveryOnDefaultNetwork indicates if service discovery is supported on the default network |
|
| 372 |
+func serviceDiscoveryOnDefaultNetwork() bool {
|
|
| 373 |
+ return false |
|
| 374 |
+} |
|
| 375 |
+ |
|
| 371 | 376 |
func (daemon *Daemon) setupPathsAndSandboxOptions(container *container.Container, sboxOptions *[]libnetwork.SandboxOption) error {
|
| 372 | 377 |
var err error |
| 373 | 378 |
|
| ... | ... |
@@ -154,6 +154,11 @@ func enableIPOnPredefinedNetwork() bool {
|
| 154 | 154 |
return true |
| 155 | 155 |
} |
| 156 | 156 |
|
| 157 |
+// serviceDiscoveryOnDefaultNetwork indicates if service discovery is supported on the default network |
|
| 158 |
+func serviceDiscoveryOnDefaultNetwork() bool {
|
|
| 159 |
+ return true |
|
| 160 |
+} |
|
| 161 |
+ |
|
| 157 | 162 |
func (daemon *Daemon) setupPathsAndSandboxOptions(container *container.Container, sboxOptions *[]libnetwork.SandboxOption) error {
|
| 158 | 163 |
return nil |
| 159 | 164 |
} |
| ... | ... |
@@ -796,7 +796,7 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep |
| 796 | 796 |
|
| 797 | 797 |
defaultNetName := runconfig.DefaultDaemonNetworkMode().NetworkName() |
| 798 | 798 |
|
| 799 |
- if (!c.EnableServiceDiscoveryOnDefaultNetwork() && n.Name() == defaultNetName) || |
|
| 799 |
+ if (!serviceDiscoveryOnDefaultNetwork() && n.Name() == defaultNetName) || |
|
| 800 | 800 |
c.NetworkSettings.IsAnonymousEndpoint {
|
| 801 | 801 |
createOptions = append(createOptions, libnetwork.CreateOptionAnonymous()) |
| 802 | 802 |
} |