Cloud-init is not possible with IPv6 because the net.is_ip_address function cannot resolve fe80::a9fe:a9fe%25{iface}, instead of fe80::a9fe:a9fe%{iface}. Leading to the removal of IPv6 from the metadata retrieval list.
# cloudinit/sources/DataSourceOpenStack.py
DEF_MD_URLS = [
"http://[fe80::a9fe:a9fe%25{iface}]".format(
iface=self.distro.fallback_interface
),
"http://169.254.169.254",
]
# cloudinit/util.py
with suppress(ValueError):
if net.is_ip_address(parsed_url.netloc.strip("[]")):
return True
Fix by
# cloudinit/sources/DataSourceOpenStack.py
DEF_MD_URLS = [
"http://[fe80::a9fe:a9fe%{iface}]".format(
iface=self.distro.fallback_interface
),
"http://169.254.169.254",
]
# cloudinit/util.py
with suppress(ValueError):
if net.is_ip_address(parsed_url.netloc.strip("[]")):
return True
Steps to reproduce the problem
$ cloud-init init
Environment details
Cloud-init version: 24.3.1-0ubuntu0~20.04.1
Operating System Distribution: ubuntu 20.04
Cloud provider, platform or installer type: OpenStack
Bug report
Cloud-init is not possible with IPv6 because the
net.is_ip_address
function cannot resolvefe80::a9fe:a9fe%25{iface}
, instead offe80::a9fe:a9fe%{iface}
. Leading to the removal of IPv6 from the metadata retrieval list.Fix by
Steps to reproduce the problem
$ cloud-init init
Environment details