Run Ubuntu Server 12.04 (or a later version) in a VM. Reboot. Cloud-init continues to work. Then install xubuntu-desktop. Then reboot; you will see that there is now a broken route to the link-local IPv4 address (169.254.169.254), which breaks cloud-init. Details follow.
Here is an excerpt from a successful reboot before installing xubuntu-desktop:
...
cloud-init start-local running: Fri, 28 Mar 2014 15:24:45 +0000. up 3.46 seconds
no instance data found in start-local
ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 10.10.0.136 255.255.0.0 fa:63:63:c3:0c:b0
ci-info: route-0: 0.0.0.0 10.10.0.1 0.0.0.0 eth0 UG
ci-info: route-1: 10.10.0.0 0.0.0.0 255.255.0.0 eth0 U
cloud-init start running: Fri, 28 Mar 2014 15:24:45 +0000. up 3.99 seconds
found data source: DataSourceEc2
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
* Starting AppArmor profiles [80G [74G[ OK ]
landscape-client is not configured, please run landscape-config.
* Stopping System V initialisation compatibility[74G[ OK ]
* Starting System V runlevel compatibility[74G[ OK ]
* Starting regular background program processing daemon[74G[ OK ]
* Starting save kernel messages[74G[ OK ]
* Starting deferred execution scheduler[74G[ OK ]
* Starting ACPI daemon[74G[ OK ]
* Starting automatic crash report generation[74G[ OK ]
* Stopping save kernel messages[74G[ OK ]
* Starting CPU interrupts balancing daemon[74G[ OK ]
* Stopping System V runlevel compatibility[74G[ OK ]
* Starting execute cloud user/final scripts[74G[ OK ]
cloud-init boot finished at Fri, 28 Mar 2014 15:24:58 +0000. Up 16.74 seconds
...
Now, here is an excerpt from a reboot after installing xubuntu-desktop:
...
cloud-init start-local running: Fri, 28 Mar 2014 18:39:24 +0000. up 5.10 seconds
no instance data found in start-local
ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 10.10.0.136 255.255.0.0 fa:63:63:c3:0c:b0
ci-info: route-0: 0.0.0.0 10.10.0.1 0.0.0.0 eth0 UG
ci-info: route-1: 10.10.0.0 0.0.0.0 255.255.0.0 eth0 U
ci-info: route-2: 169.254.0.0 0.0.0.0 255.255.0.0 eth0 U
cloud-init start running: Fri, 28 Mar 2014 18:39:25 +0000. up 5.90 seconds
2014-03-28 18:39:28,821 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [3/120s]: url error [[Errno 113] No route to host]
(as you can imagine, lots of bad stuff follows)
What is going wrong here, and how do I fix it?
ifup
on network interfaces.ifup
invokes all the scripts that are configured into the relevant directory, and avahi-autoipd configures one (/etc/network/if-up.d/avahi-autoipd). It is that script that adds the problematic route.ubuntu-bug xubuntu-desktop
and let the BugSquad/devs handle it.