Article View: linux.debian.bugs.dist
Article #5207Bug#1154565: cloud-init - Fails to setup IPv4 ephemeral network on IPv6-only EC2 instance
From: 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
Technical Details
Message-ID:
<O1wdX-d53q-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Bastian Blank <waldi@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1154565: cloud-init - Fails to setup IPv4 ephemeral network on IPv6-only EC2 instance Date: Fri, 20 Nov 2026 13:50:01 +0100 Message-ID: <O1wdX-d53q-1@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Fri Nov 20 12:49:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.9 Reply-To: Bastian Blank <waldi@debian.org>, 1154565@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: waldi@debian.org, debian-cloud@lists.debian.org X-Debian-Pr-Message: report 1154565 X-Debian-Pr-Package: cloud-init X-Debian-Pr-Source: cloud-init Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: reportbug 13.2.0+nmu1 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003702 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 95 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 20 Nov 2026 13:46:57 +0100 X-Original-Message-ID: <179517881797.64229.17334696862820355184.reportbug@steamhammer.waldi.eu.org>