Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Bastian Blank
Fri, 20 Nov 2026 12:50
Bug#1154565: cloud-init - Fails to setup IPv4 ephemeral network on IPv6-only EC2 instance
Author: Bastian Blank
Date: Fri, 20 Nov 2026 12:50
Date: Fri, 20 Nov 2026 12:50
95 lines
4985 bytes
4985 bytes
Package: cloud-init
Version: 26.2-2
Severity: important
X-Debbugs-Cc: waldi@debian.org
Current cloud-init blocks on IPv6-only EC2 instances during the
init-local run. It tries to setup both IPv4 and IPv6 ephemeral
networks, where IPv4 ultimately fails and IPv6 does not work correctly.
The IPv4 ephemeral setup fails while setting up routes. It calls ip
route without the "onlink" flag and without any reachable gateway:
| ip -4 route append 169.254.169.253/32 via 169.254.0.1 dev ens5
The IPv6 ephemeral setup does not work correctly, as it can only makes sure
link-local is available. However the EC2 metadata service is not
reachable via IPv6 link-local, but via a well known (and not properly
assigned) ULA address. To reach this address, the network setup would
need to use DHCPv6 as well.
As both variants fail in different ways, init-local can not reach any
metadata service and retries for four minutes.
This fails also in stable, so we should fix both.
Fix:
diff --git a/cloudinit/net/netops/iproute2.py b/cloudinit/net/netops/iproute2.py
index e40e5dc9..263ff890 100644
--- a/cloudinit/net/netops/iproute2.py
+++ b/cloudinit/net/netops/iproute2.py
@@ -55,6 +55,7 @@ class Iproute2(NetOps):
*gateway_args,
"dev",
interface,
+ "onlink",
*source_args,
]
)
@@ -74,6 +75,7 @@ class Iproute2(NetOps):
*gateway_args,
"dev",
interface,
+ "onlink",
]
)
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (700, 'testing'), (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 7.3.4+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages cloud-init depends on:
ii eject 2.42.4-1
ii fdisk 2.42.4-1
pn gdisk <none>
ii isc-dhcp-client 4.4.3-P1-8
ii locales 2.43-7
ii lsb-base 11.6
ii lsb-release 12.1-2
ii netcat-openbsd 1.238-1
ii procps 2:4.0.7-1.1
ii python3 3.14.7-3
pn python3-configobj <none>
ii python3-jinja2 3.1.6-4
pn python3-jsonpatch <none>
ii python3-jsonschema 4.26.0-3
ii python3-netifaces 0.11.0-2+b9
ii python3-oauthlib 3.3.1-2
ii python3-requests 2.34.2-1
pn python3-serial <none>
ii python3-yaml 6.0.3-1+b2
ii sysvinit-utils [lsb-base] 3.18-2
ii util-linux 2.42.4-1
Versions of packages cloud-init recommends:
pn cloud-guest-utils <none>
pn eatmydata <none>
ii python3-passlib 1.9.3-3
ii sudo 1.9.17p2-11
Versions of packages cloud-init suggests:
ii btrfs-progs 7.3-1
ii e2fsprogs 1.47.4-1+b3
ii python3-passlib 1.9.3-3
pn ssh-import-id <none>
ii xfsprogs 7.2.0-1
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads