Wednesday 20 April 2016

Predictable Network Interface Names in Cloud Images

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXF4SxAAoJEO7mh3btsT6gnCYP/2xJ8WJFA0CsXAHAed1fHoSV
5X0lzvJa2S3lm6vbgry0lN9VDEhSxgrkw5NXNaFDuw9PjME/tM+bcfP5H033cMEx
o746GKmlO/pcfTeXeLCa8sIOFSVL5V+JFvwCKJ7lcOh82SupNedRBUFMt6ki8vru
M2BGILnr49t7JYVSFwaAIXw0THkwQrd6rdqGy79/Y68Mq+ESn4rWajODfngNCdF1
Wsb/XaCECUET2FchjvWkt8hATnsn7qMZwWKWY5HG4jLiRVWUXzVk2tk0sZPQNw5p
r8L4is/f6P5neHuqR/rm2detKRPtg44VariR14w92TTzdcX/wnKA9EYtn41q+3lV
8E20+Z1hJtIpoBGCiq2UuSFlWaILvTeQQMyKy4Q9TyIIir/VKaepYukPbgJKhXH6
bfFaiDQoYDBelu+hrffvweYqDX82SeIZs7q4yP0HTbOZ0D98JwtjrB+KG6WT2Vgw
SJ8KUzht9igU4z6eOowLA9oyQ9bQ3n1/gUVuO2HxJs9LZJC2a6Ll6yJO+GwFiIwj
UMCBpzzAOX3IqS+Eo6E/xCq8FA1H2ucR+jzSqgOmBIoc8vqSTc3NxaNolb5ydnyA
FppNWCKiPAE/XEJu5a2qmje63p6CB+5KaWyD1Zej3kxRjLaY7klRmIVXiS/2pYIE
UM9SzdmTWhvqrdMOFFWs
=aLu+
-----END PGP SIGNATURE-----
Hello all,

TL;DR: As of yesterday, xenial cloud images no longer have an eth0
interface, but one named by systemd instead. cloud-init should handle
DHCP'ing on it in the simple case, but you will need to update scripting
which assumes eth0's existence. Sorry for the lateness of the change!

In wily[0], support for systemd's predictable interface naming[1] was
introduced to Ubuntu.

This broke the majority of clouds and cloud images, where it was assumed
that eth0 will exist and be the primary interface. As such, we made the
decision to disable predictable interface naming in wily (by setting
net.ifnames=0 in the default grub command line on cloud images), thereby
taking on a delta from the server image in the cloud images.

We did this with the understanding that this delta was unsupportable for
a five year LTS cycle, and that it would be reverted during the xenial
cycle. To enable us to use the predictable interface names, cloud-init
would learn to dynamically discover interfaces on boot, and configure
DHCP on the "first" of them; this would mimic the hard-coded eth0
behaviour in the wily-and-earlier cloud images.

The work done to enable this default cloud-init behaviour[2] (as well as
a slew of other, more complex network configuration) landed at the end
of March[3]. Since then, we have been making changes to our build
system to support this change, and testing the output on the various
clouds on which Ubuntu images are supported.

Once we were happy that the cloud images were functioning correctly, in
the middle of last week, we made the change to cut over to the new
network interface naming. As such, cloud images will now have device
names from systemd (e.g. ens3), rather than the kernel names (e.g. eth0).

Unfortunately, we had an unrelated outage in our synchronisation
infrastructure, which meant that the images that were produced at the
end of last week didn't actually appear on cloud-images.ubuntu.com
and/or in the streams on cloud-images.ubuntu.com until yesterday.

Apologies for the late, late, late timing of this change. It was a
necessary evil to ensure that (a) we had functional cloud images for the
majority of the Xenial development cycle, but (b) we have cloud images
that we can commit to supporting for the 5 year xenial support cycle.


Thanks, on behalf of the CPC team,

Dan Watkins (Odd_Bloke)


[0] https://lists.ubuntu.com/archives/ubuntu-devel/2015-June/038786.html
[1]
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
[2] Thanks to Scott Moser and Ryan Harper!
[3] https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1189-0ubuntu1