cloud-init network fails if ipv6 is disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm using cloud-init on a Debian machien in AWS.
On these machiesn, ipv6 is disabled by setting /proc/sys/
bas@machine:
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https:/
Listening on LPF/ens5/
Sending on LPF/ens5/
Sending on Socket/fallback
DHCPREQUEST for 10.0.16.20 on ens5 to 255.255.255.255 port 67
DHCPACK of 10.0.16.20 from 10.0.16.1
RTNETLINK answers: File exists
bound to 10.0.16.20 -- renewal in 1796 seconds.
Could not get a link-local address
run-parts: /etc/network/
ifup: failed to bring up ens5
Even worse, on boot the machines do get a proper ipv4 address, but (apparently because setting up the network fails), the dhcp (v4) daemon is stopped, and the machines "mysteriously" drop off the net after the lease ends.
1. AWS with official Debian buster images (https:/
2.
bas@machine:~$ cat /etc/network/
# Include files from /etc/network/
source-directory /etc/network/
# Cloud images dynamically generate config fragments for newly
# attached interfaces. See /etc/udev/
# and /etc/network/
# configuration fragments are stored in /run:
source-directory /run/network/
bas@machine:~$ cat /run/network/
auto ens5
allow-hotplug ens5
iface ens5 inet dhcp
iface ens5 inet6 manual
try_dhcp 1
Thanks for reporting the bug and attaching the logs. Looking at the logs and your description it appears to be an issue with your Debian image itself.
The files, /etc/network/ if-pre- up.d/cloud_ inet6 , and /etc/cloud/ cloud.cfg. d/99-disable- network- config. cfg are not part of cloud-init itself.
The latter file is configuring cloud-init to not touch networking and that the image will bring it up. The former file looks like it needs some error handling in the case of disabling ipv6.
Looking at the Debian AWS/EC2 FAQ[1] it suggests that you can[2]:
"""
Please report bugs to the cloud.debian.org pseudo-package, when they are related to the choices made when building the image (which packages to include, which customisation was made, etc.). Advanced users can add the usertags to triage the report more precisely.
"""
As this appears to be an issue with the AMI, I'm going to mark this bug Invalid for cloud-init. If you feel that there is an issue with cloud-init, please mark this bug New and add some addition
information to help explain how cloud-init is involved.
1. https:/ /wiki.debian. org/Amazon/ EC2/FAQ /wiki.debian. org/Amazon/ EC2/FAQ# Q:_Where_ do_I_report_ issues_ with_the_ images_ .3F
2. https:/