sysconfig only applies subnet/route config to physical interfaces

Bug #1695092 reported by Ryan Harper
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Released
Ryan Harper

Bug Description

cloud-init master

Testing bridging configuration. First, empty subnets break sysconfig rendering; this has been reported in other bugs), after that, the resulting ifcfg-br0 does not include the static network configuration. Upon closer examination the _render_interface_subnets and routes is only called in the _render_physical_interface code. Instead, this should be called on *any* interface as we can configure subnets and routes on vlans or bridges, bonds, etc.

% cat bridge.yaml
    version: 1
        - type: physical
          name: eth0
          mac_address: "52:54:00:12:34:00"
              - type: dhcp4
        - type: physical
          name: eth1
          mac_address: "52:54:00:12:34:02"
        - type: physical
          name: eth2
          mac_address: "52:54:00:12:34:04"
        - type: bridge
          name: br0
            - eth1
            - eth2
              bridge_ageing: 250
              bridge_bridgeprio: 22
              bridge_fd: 1
              bridge_gcint: 2
              bridge_hello: 1
              bridge_maxage: 10
              bridge_maxwait: 0
                - eth1 50
                - eth2 75
                - eth1 28
                - eth2 14
              bridge_stp: 'off'
                - 1 eth1
                - 2 eth2
              - type: static

After fixing the empty subnet issue, we can see in net-convert rendering of ifcfg-br0 is missing
the address.

% cat target-sysconfig/etc/sysconfig/network-scripts/ifcfg-br0
# Created by cloud-init on instance boot automatically, do not edit.

Tags: centos7
Revision history for this message
Ryan Harper (raharper) wrote :
Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ryan Harper (raharper)
Scott Moser (smoser)
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

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
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.