podman
outputs misleading error in some cases where docker API v1 & v2 is enabled. Is it possible to tell podman to not ping v1?
#24011
Replies: 4 comments
-
@mtrmac PTAL |
Beta Was this translation helpful? Give feedback.
-
No, We should change the error message, or, possibly, remove the |
Beta Was this translation helpful? Give feedback.
-
Would it make sense to remove only the call to ping v1 when detecting properties? All it does is to see if |
Beta Was this translation helpful? Give feedback.
-
I posted this PR to resolve this issue: containers/image#2588 |
Beta Was this translation helpful? Give feedback.
-
When there is an error pinging the Docker API v2,
podman
, through theimage
library, attempts to ping v1, and if the Docker Registry has that v1 API enabled, then the output error is "can't talk to a v1 container registry", however, the original error for ping v2 is missing.The problem appears to come down to this code: https://github.com/containers/image/blob/31d4ad14fe4da8ef3969ff67297831ab291c76f1/docker/docker_client.go#L903
If the ping v2 fails, the
ping(..)
method returns error, so then ping v1 is attempted. If that one succeeds, the actual error from ping v2 is not displayed. When there are connectivity issues, for example, it is possible for a docker registry that has both v1 and v2 enabled to fail with v2 and then succeed with v1. It would be preferable that the library errors with the actual ping v2 error plus a note that v1 was detected and is not supported.The code does have a property that checks if the
DockerDisableV1Ping
istrue
, and the comment explains this same scenario saying "if true, a V1 ping attempt isn't done to give users a better error
". However, I can't find anywhere wherepodman
loads that flag from any config.Is there a way to tell
podman
to not even try v1?Beta Was this translation helpful? Give feedback.
All reactions