Comment 2 for bug 1640635

Revision history for this message
Paul Graydon (pgraydon-oracle) wrote :

Clean instance, ran apt upgrade, and apt install cloud-init. I didn't replace the cloud.cfg file with one of our format as I tried to keep changes as minimal as possible, and the supplied one seems to work sufficiently.

$ echo "network: {config: disabled}" | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}

$ sudo rm /etc/network/interfaces/50-cloud-init.cfg
rm: cannot remove '/etc/network/interfaces/50-cloud-init.cfg': Not a directory

$ sudo reboot
packet_write_wait: Connection to UNKNOWN: Broken pipe

After reboot:

$ cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback

# control-manual ens2f0
iface ens2f0 inet dhcp
    broadcast 10.0.0.255
    dns-nameservers 169.254.169.254
    gateway 10.0.0.1
    netmask 255.255.255.0

$ grep "INFO.*disabled" /var/log/cloud-init.log
$

I've attached a copy of the cloud-init.log