~ubuntu-on-ec2/vmbuilder/jenkins_kvm-maas-trusty-ppc64

Viewing all changes in revision 802.

Azure's nic hotplug: deliver static/etc/netplan/90-hotplug-azure.yaml

Allow netplan/networkd to automatically bringup hotplugged nics
by delivering a flexible static netplan yaml file to catch any new ethernet devices attached to the Azure instance. The hotplug-azure yaml will complement cloud-init's initial/strict eth0 match definition which is matching only to a specific to macaddress for eth0.

Because cloud-init's netwok configuration is is only created at boot,
a detach of the original eth0 nic and attach of a new nic would cause
cloud-init's netplan yaml to fail to match, resulting in no network
config. Given the supplemental 90-hotplug-azure.yaml, the following
"hotpluggedeth0" opaque-id will match on any new eth0 present on the
system after reboot. Systemd will and set that nic the
primary/mandatory interface. eth1 or greater are left as optional
ephemeral devices, meaning that networkd boot will not block on their
link being up.

   hotpluggedeth0:
       dhcp4: true
       match:
          driver: hv_netvsc
          name: 'eth0'

Also avoid appending unnecessary include directives or udev rules in
/etc/network/interfaces on netplan-enabled systems.
[a=chad.smith][r=daxtens,daniel-thewatkins,fginther]

MP: https://code.launchpad.net/~chad.smith/vmbuilder/jenkins_kvm_azure_netplan_hotplug/+merge/347212

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: