diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-06-03 14:23:34 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-06-03 14:23:34 -0400 |
commit | 8a8d7eed2ed5696d58a825ec7301d8424c23ce5e (patch) | |
tree | 1d912da1c886caa6044e650114771f736b8b20dd /cloudinit/net/__init__.py | |
parent | e2c2d70cde19211b18e5ec333e1cb0382d93f14d (diff) | |
download | vyos-cloud-init-8a8d7eed2ed5696d58a825ec7301d8424c23ce5e.tar.gz vyos-cloud-init-8a8d7eed2ed5696d58a825ec7301d8424c23ce5e.zip |
avoid rendering 'lo' twice by not writing it in network config.
Diffstat (limited to 'cloudinit/net/__init__.py')
-rw-r--r-- | cloudinit/net/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py index f47053b2..c72b6ff8 100644 --- a/cloudinit/net/__init__.py +++ b/cloudinit/net/__init__.py @@ -788,6 +788,10 @@ def _ifaces_to_net_config_data(ifaces): for name, data in ifaces.items(): # devname is 'eth0' for name='eth0:1' devname = name.partition(":")[0] + if devname == "lo": + # currently provding 'lo' in network config results in duplicate + # entries. in rendered interfaces file. so skip it. + continue if devname not in devs: devs[devname] = {'type': 'physical', 'name': devname, 'subnets': []} |