-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
testcontainers integration: is already connected to CNI network "podman": network already exists - docker behavior divergence #15499
Comments
Podman is the name of the default network, so it could be that Docker reports 200 on a API network connect call when the network is already created, and Podman treats it as an error. |
Sorry, when the network is already connected, not created |
I tested the same http commands against docker and it reply with HTTP 200 code. Actually, I believe that the proper result should be HTTP 409. I don't know if this different behavior can be considered a bug: anyway 500 seems not correct. it depends if you prefer to pursue the same user experience. |
IMO 200 is the correct state here, the request is effectively a harmless no-op, not an invalid transition. We should change this. |
I had the chance to debug the issue with @dmarrazzo yesterday and I ended up with two ideas:
In this way, the behaviour would be identical to the docker one, error on the CLI, 200 on the API. |
Compat: Treat already attached networks as a no-op Applies only to containers in created state. Maintain error in running state. Co-authored-by: Alessandro Rossi <[email protected]> Co-authored-by: Brent Baude <[email protected]> Co-authored-by: Jason T. Greene <[email protected]> Signed-off-by: Alessandro Rossi <[email protected]> Signed-off-by: Jason T. Greene <[email protected]>
Howdy! I ran into this while attempting to use the supabase CLI tool with podman instead of docker. The supabase CLI spins up a bunch of containers, and at several points attempts to create a docker network if it doesn't already exist, as determined by docker library error helpers which are explicitly looking for HTTP 409 status, and don't properly interpret podman's 500. I'm unsure if this belongs as a separate issue, but it's an example where the HTTP 500 rather than 409 behavior diverges from the Docker REST API. |
Yes, separate issue would be best |
Hey, @jgraettinger I've hit the same problem, were you able to resolve your issue? If you created a new issue report could you link to it? |
Here for the same issue re: podman + supabase |
BUG REPORT
Description
This issue is cause by an apparent divergence between the docker behavior and podman.
Test containers is a project which automate the container creation to simplify the developer experience (it automatically starts the container to be used for testing purposing during the development lifecycle).
Specifically, quarkus project relies on testcontainers for its
dev mode
.In general it works pretty well and how to tune up the environment is described here:
https://quarkus.io/blog/quarkus-devservices-testcontainers-podman/
This issue was noticed dealing with a specific project:
https://github.com/kiegroup/kogito-examples/tree/stable/serverless-workflow-examples/serverless-workflow-greeting-quarkus
Analyzing the logs, I was able to reproduce the problem using the curl command against the Libpod restfull APIs.
Steps to reproduce the issue:
Results:
The error (500) prevents testcontainers and quarkus from completing the normal initialization.
Expected Result:
This problem does not happen using
docker
, my educated guess is that docker networking is different or it's more tolerant.Output of
podman version
:Tested with v3 and v4:
Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):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)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical Fedora 36
Optional - How to reproduce with quarkus / maven
clone the repository: https://github.com/kiegroup/kogito-examples/
switch on the tag
change directory to
serverless-workflow-examples/serverless-workflow-greeting-quarkus
launch quarkus in dev mode:
The text was updated successfully, but these errors were encountered: