Closed dmarrazzo closed 2 years ago
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:
1) Defining a new Error, like ErrNetworkConnected (the 'network already exists' message doesn't make sense there) Use the error here where the check that gives the error and propagates upper in the call chain.
2) handling the error here if the error is a ErrNetworkConnected just return a 200
In this way, the behaviour would be identical to the docker one, error on the CLI, 200 on the API.
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: