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

Cannot create network with name "bridge" because it conflicts with a valid network mode #14983

Closed
albertdb opened this issue Jul 20, 2022 · 7 comments · Fixed by #15016
Closed
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@albertdb
Copy link

albertdb commented Jul 20, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Cannot create a network named bridge to make badly written applications (but not changeable) that depend on Docker default network name work.

Steps to reproduce the issue:

  1. podman network create bridge

Describe the results you received:

Error: cannot create network with name "bridge" because it conflicts with a valid network mode

Describe the results you expected:

Network is created.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

4.1.0

Package info (e.g. output of rpm -q podman or apt list podman):

(42/43) Installing podman (4.1.0-r1)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Podman inside Alpine container.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 20, 2022
@Luap99
Copy link
Member

Luap99 commented Jul 20, 2022

You should not have to create a network called bridge. Podman already accepts --network bridge and will automatically map this to the default podman network.

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2022
@albertdb
Copy link
Author

albertdb commented Jul 20, 2022

You should not have to create a network called bridge. Podman already accepts --network bridge and will automatically map this to the default podman network.

@Luap99 It doesn't seem to be the case though the API.

Status 404: {"cause":"network not found","message":"unable to find network with name or ID bridge: network not found","response":404}

@Luap99
Copy link
Member

Luap99 commented Jul 20, 2022

Please provide a full reproducer

@albertdb
Copy link
Author

albertdb commented Jul 20, 2022

Please provide a full reproducer

Using this project as a basis https://github.com/devonfw-sample/devon4quarkus-reference

Run inside a Docker container (in my case a GitLab runner) with image maven:3-eclipse-temurin-11-alpine and mounting the project code, the following commands:

apk add --no-cache podman podman-docker git
echo "export TESTCONTAINERS_RYUK_DISABLED=true" >> ~/.bashrc
source ~/.bashrc
podman system service --time=0 unix:/var/run/docker.sock & sleep 5
podman network ls
docker run --rm hello-world
# you can do a git clone here and cd into the dir, instead of mounting the project code
mvn package

Last command with throw at the end:

Status 404: {"cause":"network not found","message":"unable to find network with name or ID bridge: network not found","response":404}

@Luap99
Copy link
Member

Luap99 commented Jul 20, 2022

I don't have time to run such big complicated reproducers, please provide the exact API call where we error.
You can use podman system service --log-level debug to see the calls

@albertdb
Copy link
Author

I don't have time to run such big complicated reproducers, please provide the exact API call where we error. You can use podman system service --log-level debug to see the calls

Oh, that's a very useful flag for this case. Here's the relevant API call:

@ - - [20/Jul/2022:12:29:47 +0000] "GET /v1.30/networks/bridge HTTP/1.1" 404 122 "" "okhttp/3.14.4"

@Luap99 Luap99 reopened this Jul 20, 2022
@Luap99 Luap99 self-assigned this Jul 21, 2022
@Luap99 Luap99 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Jul 21, 2022
Luap99 added a commit to Luap99/libpod that referenced this issue Jul 21, 2022
Docker uses "bridge" as default network name so some tools expect this
to work with network list or inspect. To fix this we change "bridge" to
the podman default ("podman") name.

Fixes containers#14983

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member

Luap99 commented Jul 22, 2022

Should be fixed in the next release (v4.2).

As workaround you could also try setting the default network name to bridge in containers.conf.

mheon pushed a commit to mheon/libpod that referenced this issue Jul 26, 2022
Docker uses "bridge" as default network name so some tools expect this
to work with network list or inspect. To fix this we change "bridge" to
the podman default ("podman") name.

Fixes containers#14983

Signed-off-by: Paul Holzinger <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants