cloudinit/net/ does not parse network_data.json correctly

Bug #1665441 reported by Lars Kellogg-Stedman on 2017-02-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Lars Kellogg-Stedman

Bug Description

In cloudinit/net/, we see:

            elif len(iface_subnets) > 1:
                for i, iface_subnet in enumerate(iface_subnets,
                    iface_sub_cfg = iface_cfg.copy()
           = "%s:%s" % (iface_name, i)
                    cls._render_subnet(iface_sub_cfg, route_cfg, iface_subnet)

The code 'start=len(iface.children)' fails because at this point, iface is simply a dict, and has no 'children' attribute.

Related branches

Lars Kellogg-Stedman (larsks) wrote :

I am working on a fix in That branch right now will run without errors but the resulting config file appears to be missing an ip address.

Lars Kellogg-Stedman (larsks) wrote :

I've gone ahead and proposed the fix for merging. It results in interface config files that are correct but that will only work with legacy (pre-NetworkManager) networking until reaches centos/rhel/etc packaging.

Changed in cloud-init:
assignee: nobody → Lars Kellogg-Stedman (larsks)
status: New → Confirmed
Changed in cloud-init:
status: Confirmed → Fix Committed
Scott Moser (smoser) on 2017-07-03
Changed in cloud-init:
importance: Undecided → Medium

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers