New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-compose not working with swarm overlay networking in docker v1.12rc #24107
Comments
Can confirm:
|
I reported this with Looks it's working as intended unfortunately. You'll still have to use a 3rd party K/V store for overlay networks. |
That's correct,
|
Thanks @sdemura for your input. And @dnephin "docker-compose bundle" does not work either with same error. hmm. Will docker-compose be supported with built-in swarm-mode overlay network when v1.12 is GA? |
I think for now this is a docs issue /cc @sfsmithcha |
I'm actually confused. I've tried to run the following docker-compose file in my docker 1.12 swarm mode cluster:
But I only get a message: "ERROR: driver name: if driver is specified name is required" |
Also confused when create calico network:
Docker 1.12 only support overlay driver now? |
@gwanii looks like that's a different issue; are you sure the calico driver is properly installed? Please open a new issue if it's not working |
I have the same issue with docker 1.12.0-rc4
I hope it will be fixed in Docker 1.12 GA |
@leokhoa that error message is coming from Docker Compose; make sure you're using the latest version (release candidate) of Docker Compose. If that doesn't resolve the issue, please open an issue in the Docker Compose issue tracker, where it should be resolved; http://github.com/docker/compose/issues |
Hi, I'm using docker 1.12.0 GA (and compose 1.8) and experimenting the same problem @michelvocks (ERROR: driver name: if driver is specified name is required). Overlay network OK: ` docker@swarm0:~$ docker network ls ` Container based on this network KO: ` ` Am I missing something ? |
@pouicr we're having similar issues. So far, from what I can find, it appears that you can only connect to a Docker 1.12 'swarm scoped' overlay network if you use Happy to be corrected. We are trying to shift to using a Docker 1.12 swarm, but our overlay network in the
For our current concept testing we have had to use a
|
Thx @al-jeyapal for the feedback. |
Docs issue covered by : cc5debc |
My understanding is that docker-compose is getting replaced by .dab files for the multi-node use case, which is fine... So beside scaling a simple service with almost no configuration, I'm curious how people are actually using swarm in production, securely, right now? Maybe our use case is too complex, though it doesn't seem like it, but hopefully every arguments supported by run that were available in compose will be in the .dab by 1.13, otherwise it's going to be a long wait... Cheers! |
@dnephin In which docker version is |
@schmunk42 it's in docker 1.12.x with experimental features enabled |
@thaJeztah Thank you, I installed an experimental client and found the |
@schmunk42 I think it's currently client-side only (https://github.com/docker/docker/blob/e8b9f38c7e2e249084c78c81f136c6d22432af6f/cli/command/stack/deploy.go#L48-L69) |
@al-jeyapal this worked for me !!!!!! thanks |
Version 1.12.6 If I want to create a docker-compose network with 'overlay' driver, I get
If I force it to 'bridge', no error. If I create the network separately, it works fine. |
same issue with version 1.13 |
@fabio-barile that should be fixed in docker 1.13.1, see #28528, and fixed by #29826 |
Output of
docker version
:root@xxxxx:~# docker version
Client:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built: Fri Jun 17 21:09:07 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built: Fri Jun 17 21:09:07 2016
OS/Arch: linux/amd64
root@xxxxx:~# docker-compose version
docker-compose version 1.8.0-rc1, build 9bf6bc6
docker-py version: 1.8.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
Output of
docker info
:Containers: 49
Running: 0
Paused: 0
Stopped: 49
Images: 109
Server Version: 1.12.0-rc2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 246
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge overlay null host
Swarm: active
NodeID: 34lgngb2j2iufvk046th0p6qq
IsManager: Yes
Managers: 1
Nodes: 3
CACertHash: sha256:4dd1a761493f5ef3fcaa783113b85b935a7686cc954f5507af9b3743b87cd5b9
Runtimes: default
Default Runtime: default
Security Options: apparmor seccomp
Kernel Version: 3.16.0-30-generic
Operating System: Ubuntu 14.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.955 GiB
Name: pek2-gosv-16-dhcp226
ID: 2B4M:L4M2:6Q3A:HLAU:3CNJ:JA7I:34T3:NRBA:BGY6:RY5A:4AS3:AC6L
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Http Proxy: xxxx.some.com:1234
Https Proxy: xxxx.some.com:1234
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
Additional environment details (AWS, VirtualBox, physical, etc.):
Steps to reproduce the issue:
0. Prepare three ubuntu14.04 machines, here I used VMware VMs
pengzhencao@pek2-gosv-16-dhcp226:
/docker/docker$ docker node list/docker/docker$ docker network listID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS
34lgngb2j2iufvk046th0p6qq * pek2-gosv-16-dhcp226 Accepted Ready Active Leader
37fmlm52xw0iy7k6zoo5j09px pek2-gosv-16-dhcp160 Accepted Ready Active
61lw7iskl9ivnxaveby8dfaf1 pek2-gosv-16-dhcp45 Accepted Ready Active
pengzhencao@pek2-gosv-16-dhcp226:
NETWORK ID NAME DRIVER SCOPE
8b94d08c0f67 bridge bridge local
74b71c054864 deploy_default bridge local
abd08b2c6c5d docker_gwbridge bridge local
651d9df026eb host host local
7oywymoz6bbp ingress overlay swarm
18e3039be16b none null local
version: '2'
services:
log:
build: ./log/
volumes:
- /var/log/harbor/:/var/log/docker/
ports:
- 1514:514
....(some other services)
networks:
default:
external:
name: ingress
Describe the results you received:
pengzhencao@pek2-gosv-16-dhcp226:~/harbor/Deploy$ docker-compose up
Recreating deploy_log_1
ERROR: for log swarm-scoped network (ingress) is not compatible with
docker create
ordocker run
. This network can be only used docker serviceERROR: Encountered errors while bringing up the project.
Describe the results you expected:
Docker compose should deploy the services up with overlay network "ingress"
Additional information you deem important (e.g. issue happens only occasionally):
I've followed swarm and docker-compose integration guide here:
https://docs.docker.com/compose/networking/
The above error seems to be thrown in L356:
in docker/daemon/container_operations.go
330 func errClusterNetworkOnRun(n string) error {
331 return fmt.Errorf("swarm-scoped network (%s) is not compatible with
docker create
ordocker run
. This network can be only used docker service", n)332 }
333
334 // updateContainerNetworkSettings update the network settings
335 func (daemon _Daemon) updateContainerNetworkSettings(container *container.Container, endpointsConfig map[string]_networktypes.EndpointSetti ngs) error {
336 var (
337 n libnetwork.Network
338 err error
339 )
340
341 mode := container.HostConfig.NetworkMode
342 if container.Config.NetworkDisabled || mode.IsContainer() {
343 return nil
344 }
345
346 networkName := mode.NetworkName()
347 if mode.IsDefault() {
348 networkName = daemon.netController.Config().Daemon.DefaultNetwork
349 }
350 if mode.IsUserDefined() {
351 n, err = daemon.FindNetwork(networkName)
352 if err != nil {
353 return err
354 }
355 if !container.Managed && n.Info().Dynamic() {
356 return errClusterNetworkOnRun(networkName)
357 }
358 networkName = n.Name()
359 }
360
The text was updated successfully, but these errors were encountered: