-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[BUG] Overlay network not found on worker node #11894
Comments
This isn't the same issue as #11387 as here this is the docker engine reporting error: Can you please confirm you can use |
I'm running into this exact same issue using Docker Compose 2.27.0. I can confirm that I can use However, using docker compose files, I also get the error |
I am having the exact same issue. |
btw is the downgrade workaround needed for both leader and worker node? |
@inql I have not tested this as our scripts set versions for all nodes. |
Hey there, also affected by this bug. If you don't want to downgrade another workaround is to create a container and attach it to the network. It then appears in the list and docker compose no longer complains
Adding My versions in case it is useful:
|
As in above, sorry did not realise that @michaelmcandrew also mentioned this but at least this comment confirms his findings: #11894 (comment) I tested this issue and noticed that if there exists running container which has connection to the external overlay network (started with So, without knowing anything about internals, the problem might have something to do with not checking for available external overlay networks but instead checking just internal networks (visible with docker network ls). So as an additinal workaround it is possible to first start "dummy" container on workers via for example:
I also checked downgrading and for Ubuntu 22.04 it worked, so I think I will be using downgraded version for now myself.
|
@kulpsin Lines 1334 to 1340 in 11d5ecd
Not sure why this doesn't work as expected, need to setup a test environment and try to reproduce this bug |
To flesh out my steps to reproduce a bit more, since they are slightly different from the ones mentioned above, I created a swarm network on the lead node with This network was not visible on the worker node (expected I think because nothing was connected). However, I was not able to connect to it with the below networks section in a
I created the following container on the worker node I was then able to connect using the above networks section in a Hope that help with the reproduction! |
Thanks this worked for me. |
Is this a bug in compose? I would expect somewhat feature parity between docker and docker compose. |
@tuxthepenguin84 docker compose does some client-side validation before running containers, and as such looks for target network to exist. |
It appears to me the issue still persists, at least for me and my use case.
The network is there.
If I run the following and get a container up and running on that "missing" network, I can get the container started with compose
Let me know if you need more info or want me to try something, I'm happy to help out and work on getting this fixed. |
@tuxthepenguin84 could you please give binary from #12233 a try (binaries available on https://github.com/docker/compose/actions/runs/11513518822, at bottom) ? This adds some debugs to the network resolution logic that will help diagnose this issue |
Thanks I'll try that out and report back. |
@ndeloof I have the issue with the compose plugin version v2.27.0 running on Ubuntu Server 24.04 with ARM Arch Here is the output of testing the binary from #12233
This version properly creates the network Here is my /etc/salt/docker/test # docker info
Client:
Version: 26.1.5
Context: default
Debug Mode: false
Plugins:
compose: Docker Compose (Docker Inc.)
Version: v2.27.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 11
Running: 6
Paused: 0
Stopped: 5
Images: 13
Server Version: 27.3.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: active
NodeID: mi4aclsip2vfc0fmdk0lizvoi
Is Manager: false
Node Address: 172.31.41.5
Manager Addresses:
172.31.45.225:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 57f17b0a6295a39009d861b89e3b3b87b005ca27
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-1016-aws
Operating System: Ubuntu 24.04.1 LTS
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 7.582GiB
Name: ip-172-31-41-5
ID: aebad7d3-d242-435a-a215-9e10a8a1a6b1
Docker Root Dir: /var/lib/docker
Debug Mode: false
Labels:
salt-minion=dd6de55b-6f41-4cfd-924f-1231ed03995b
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false will try with the latest and report |
My issue was that I have 2 versions of docker compose:
I fix it by installing the latest from edge like this: apk add docker-cli docker-cli-compose --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community |
Description
Issue:
Swarm worker hosts fail to attach to manager node overlay networks unless a container has been manually started and attached to the network using
docker run --network swarm-overlay
Expected Behavior:
This should automatically attach to the overlay network and it should be visible in the docker network info.
Workaround:
The only solution I have found is to downgrade to an earlier version (
2.21.0-1
) ofdocker-compose-plugin
I believe this is the same issue as #11387 but i couldn't find any open bugs with the same issue.
Thanks for any help with this!
Steps To Reproduce
I created a custom overlay network on the swarm manager node.
This correctly created the network and attached the relevant container to it.
I then joined a worker host to the swarm and attempted to connect a container to the overlay network.
docker compose up -d worker-service
This errors with:
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: