Comment 3 for bug 1817368

Ryan Harper (raharper) wrote :

I'm still a little confused around the presence of 75-persistent-net-generator.rules AND having systemd creating persistent nic names. That's going to cause problems unless it's always booted with net.ifnames=0.

Putting that aside, I do think using a higher number (as you suggest 80-persistent-net-cloud-init.rules) is a good fix which avoids the race by writing to different files altogether.

I don't think we need to prevent netrules_path from being configured; in Ubuntu Xenial, we still utilize our on known value. You can be the path in your Distro class as part of the renderer config.

% git diff cloudinit/distros/
diff --git a/cloudinit/distros/ b/cloudinit/distros/
index 1bfe047..b48d40e 100644
--- a/cloudinit/distros/
+++ b/cloudinit/distros/
@@ -36,6 +36,8 @@ class Distro(distros.Distro):
     tz_local_fn = '/etc/localtime'
     renderer_configs = {
         'sysconfig': {
+ 'netrules_path':
+ 'etc/udev/rules.d/80-persistent-net-cloud-init.rules',
             'control': 'etc/sysconfig/network/config',
             'iface_templates': '%(base)s/network/ifcfg-%(name)s',
             'route_templates': {