Bug#1104426: The core issue is cloud-init on IPv6-only networks
On Sun, May 04, 2025 at 08:05:00AM +0200, Bastian Blank wrote:
> On Sat, May 03, 2025 at 10:57:39PM -0400, Noah Meyerhans wrote:
> > There shouldn't be any name resolution involved here at all. My guess
> > is that something is not recognizing the scoped link-local address as an
> > IP address, and is treating it as a hostname that needs to be resolved
> > in DNS. Which is obviously going to fail. I haven't looked deeply
> > enough to determine whether this is cloud-init or a lower-level http
> > client.
>
> "requests" quotes the whole url, so undoes the fixup for "%25" to "%".
>
> urllib3 then does not de-quote the hostname, so "%25" is given to
> "getaddrinfo".
A bit further:
requests.adapters._urllib3_request_context uses urllib.parse.urlparse,
which then returns the quoted form, but without [].
urllib3.connectionpool._normalize_host will only dequote if it finds the
[] before removing them.
Bastian
--
The face of war has never changed. Surely it is more logical to heal
than to kill.
-- Surak of Vulcan, "The Savage Curtain", stardate 5906.5
Reply to: