Closed zeha closed 2 years ago
Thank you for reaching out, @zeha!
@ashley-cui @jwhonce PTAL
Is podman build with cgo enabled in brew?
As far as I know: yes, and also the podman Makefile tries to ensure this. If there are specific commands to check if a given binary is built with cgo, I can check on my install.
Note that previously, podman pull would also fail with a DNS error.
I am not sure if you can check this with the binary, maybe ldd /path/to/podman
and check if there are linked libs.
Otherwise you could build from source and check that CGO_ENABLED
is set to 1 when you call make podman-remote-darwin
Right, the Makefile does not properly set CGO_ENABLED.
Makefile lines 176-183 (in podman 3.4.4 tarball) try to set DARWIN_GCO=1 for native builds. However, this check relies on NATIVE_GOOS being set. I cannot find where this variable should be set from - the Makefile does not seem to set it.
Homebrew also exports CGO_ENABLED=1 in its formula, but that gets overwritten by the Makefile.
I do not understand what NATIVE_GOOS is/should be, but I think fixing this will help.
Okay, that came as part of my backport from the fix on main. Not sure how that worked locally last time. I'll see about making a new PR then, 3.4-specific.
-> #13020
Got merged, should be fixed in the next 3.4 release.
/kind bug
Description
This is, unfortunately, #12163 #11976 #10737 once more, but for a specific command (namely,
login
).I am trying to log into a container registry, where its DNS name is not resolvable using the resolvers listed in /etc/resolv.conf. However macOS has no problem connecting to it by name. The DNS specifics are pretty much what was explained in #12163 #11976 #10737 already.
I can tell that DNS generally works inside the
podman machine
, AND it also works forpodman pull
on the host.Steps to reproduce the issue:
Have a (gitlab) container registry that is not resolvable using the nameservers in /etc/resolv.conf
podman login gitlab-registry.example.org
Observe podman-remote talking to the nameserver in /etc/resolv.conf, and then reporting "no such host" in the debug logs.
Describe the results you received:
Describe the results you expected:
I would expect login to find the registry. I believe this worked in the past with a manually built podman 3.4.2-dev and the CGO makefile patch. But hard to tell now.
Additional information you deem important (e.g. issue happens only occasionally):
pull
works:Output of
podman version
:Output of
podman info --debug
: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)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
VPN is Cisco AnyConnect.