Skip to content
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

swarm mode and overlay networks issues #30288

Closed
Riziero opened this issue Jan 19, 2017 · 6 comments
Closed

swarm mode and overlay networks issues #30288

Riziero opened this issue Jan 19, 2017 · 6 comments

Comments

@Riziero
Copy link

Riziero commented Jan 19, 2017

Hello,

I am creating a swarm cluster and then an overlay network which I am then using to spin up services. It appears that by trying to constraint a service to run on a specific node (--constraint node.hostname==node3) then the overlay network does not work.

As in I can not ping a service by its name from other services in the same network.
As soon as I get rid of the node contraint everything goes back to being pingable again.

Anyone have any clue about this?

Thanks!

@gianarb
Copy link

gianarb commented Jan 19, 2017

Hello @Riziero can you copy paste your docker info and docker version output?
Thanks

@aboch
Copy link
Contributor

aboch commented Jan 19, 2017

@Riziero In addition to what @gianarb already asked, please also add the info about how many managers/workers, the service creation command you are using, the network creation command, and any suspicious docker daemon warn/err logs if any. Thanks.

@Riziero
Copy link
Author

Riziero commented Jan 20, 2017

@gianarb @aboch here's some more info.

I have 1 leader and 2 worker nodes:

$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
6pth9qm7d82j2324oqpd3cif9 node3 Ready Active
990z5o48vtsrfgrqfao6b3vjp node2 Ready Active
bpu3bwt85gon8sn0say2tcqgz * node1 Ready Active Leader

Docker info from node2:

$ docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 24
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 33
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: active
NodeID: 990z5o48vtsrfgrqfao6b3vjp
Is Manager: false
Node Address: 172.28.128.6
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.2.0-42-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.954 GiB
Name: node2
ID: TQ74:V2AL:7IKR:IYXW:V5HW:UUWE:BXW7:HL7E:3WQQ:LVDI:CXYP:E762
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Labels:
provider=generic
Insecure Registries:
127.0.0.0/8
`

Docker version from inside the nodes:

vagrant@node2:/buildbot$ docker -v
Docker version 1.12.6, build 78d1802

Now what I am using to service2 on node2 and service3 on node 3:
docker service create \ --network foo \ --name postgres2 \ --constraint node.hostname==node2 \ postgres:9.5

docher ssh node2
docker exec -i -t ID_OF_THE_CONTAINER_FOR_SERVICE_2 bash
ping postgres3

gives:

root@f93d8621a144:/# ping postgres3
PING postgres3 (10.0.4.5): 56 data bytes
92 bytes from f93d8621a144 (10.0.4.4): Destination Host Unreachable
92 bytes from f93d8621a144 (10.0.4.4): Destination Host Unreachable
92 bytes from f93d8621a144 (10.0.4.4): Destination Host Unreachable

Note how something strange happens with IP, going from .5 to .4

Thanks!

@Riziero
Copy link
Author

Riziero commented Jan 26, 2017

Hope this can help a bit.

Same exact test on trusty64 works well. The fail was with wily.
EDIT: Note that docker version provisioned by docker-machine is 1.3 (was 1.12).

@hezor
Copy link

hezor commented Sep 14, 2017

I have this exact same problem with Docker Swarm (1.12.6 running on three CentOS 7.3 Swarm Nodes). So @Riziero did you get this solved?

@thaJeztah
Copy link
Member

Let me close this ticket for now, as it looks like it went stale.

@thaJeztah thaJeztah closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants