Skip to content

Conversation

@skylenet
Copy link
Member

@skylenet skylenet commented Dec 1, 2025

No description provided.

@fjl fjl changed the title fix(docker): try fix network creation error internal/libdocker: try fix network creation error Dec 1, 2025
@fjl
Copy link
Collaborator

fjl commented Dec 1, 2025

Can you give some context about the issue?

@skylenet
Copy link
Member Author

skylenet commented Dec 1, 2025

@fjl nothing clear yet. Still debugging an issue that I've noticed (That's why the PR is in draft) . I just noticed some weird iptables errors on CI runs on the discv4/discv5 runs:

can't create network: API error (500): add inter-network communication rule:  (iptables failed: iptables --wait -t filter -A DOCKER-ISOLATION-STAGE-1 -i br-a2d1363c17a5 ! -o br-a2d1363c17a5 -j DOCKER-ISOLATION-STAGE-2: iptables v1.8.10 (nf_tables): Chain 'DOCKER-ISOLATION-STAGE-2' does not exist
Try `iptables -h' or 'iptables --help' for more information.
 (exit status 2))

This suspiciously started happening after this was merged in: #1369 .

Example failure: https://hive.ethpandaops.io/#/test/generic/1764570861-3701a5362e7a8cb676b3706263cf78ee

@fjl
Copy link
Collaborator

fjl commented Dec 1, 2025

https://docs.docker.com/reference/api/engine/version-history/#v144-api-changes

POST /networks/create now returns a 400 if the IPAMConfig has invalid values. Note that this change is unversioned and applied to all API versions on daemon that support version 1.44.
POST /networks/create with a duplicated name now fails systematically. As such, the CheckDuplicate field is now deprecated. Note that this change is unversioned and applied to all API versions on daemon that support version 1.44.

So we can definitely remove CheckDuplicate

@fjl
Copy link
Collaborator

fjl commented Dec 1, 2025

Attachable also seems not needed, the docs just say:

Globally scoped network is manually attachable by regular containers from workers in swarm mode.

But we don't use swarm.

@fjl
Copy link
Collaborator

fjl commented Dec 1, 2025

You can try Driver: "overlay" or Scope: "local", it might change the provisioning method of the network.

@skylenet
Copy link
Member Author

skylenet commented Dec 1, 2025

Seems to be an issue the way docker is installed/started. Forcing a restart on the docker daemon after the installation seems to solve the issue. I'll update this PR just to remove the deprecated CheckDuplicate field.

@skylenet
Copy link
Member Author

skylenet commented Dec 1, 2025

Yeah, I'm not sure about the Attachable field. I'll leave it around. The docs mention The --attachable option used in the example above disables this restriction, and allows for both swarm services and manually started containers to attach to the overlay network. ( https://docs.docker.com/reference/cli/docker/network/create/ ) . So.. we do indeed sometimes "manually" attach an existing container to the network. I think that's what docker network connect is doing, which we also seem to be using in the code via func (b *ContainerBackend) ConnectContainer(containerID, networkID string) error.

@skylenet skylenet changed the title internal/libdocker: try fix network creation error chore(internal/libdocker): remove deprecated CheckDuplicate field on CreateNetwork. Dec 1, 2025
@skylenet skylenet marked this pull request as ready for review December 1, 2025 13:40
@fjl fjl changed the title chore(internal/libdocker): remove deprecated CheckDuplicate field on CreateNetwork. internal/libdocker: remove deprecated CheckDuplicate field in CreateNetwork Dec 2, 2025
@fjl fjl merged commit 3161faf into master Dec 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants