sysconfig rendering ignores vlan name

Bug #1826608 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Wishlist
Unassigned

Bug Description

sysconfig rendering currently just does not pay attention to the vlan
device's name. Instead it attempts to set the name to the backing
device with .* stripped from the end.

Here is an example of current master output.
The 'PHYSDEV' entry should be 'eth0', not 'infra'.

$ cat my2.yaml
version: 2
ethernets:
  eth0:
    addresses: ["192.10.1.2/24"]
    match:
       macaddress: "00:16:3e:60:7c:df"
vlans:
  infra0:
    id: 1001
    link: eth0
    addresses: ["10.0.1.2/16"]

$ tox-venv py3 python3 -m cloudinit.cmd.main devel net-convert \
  --mac en0,00:16:3e:60:7c:df \
  --network-data=my2.yaml --kind=yaml \
  --distro=centos --output-kind=sysconfig \
  --directory=out.test

$ cat out.test/etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEVICE=eth0
HWADDR=00:16:3e:60:7c:df
IPADDR=192.10.1.2
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no

$ cat out.test/etc/sysconfig/network-scripts/ifcfg-infra0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEVICE=infra0
IPADDR=10.0.1.2
NETMASK=255.255.0.0
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=infra
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
VLAN=yes

Related branches

Ryan Harper (raharper)
Changed in cloud-init:
importance: Undecided → Wishlist
status: New → In Progress
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in cloud-init version 20.4.

This bug is believed to be fixed in cloud-init in version 20.4. 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: In Progress → 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.

Other bug subscribers

Remote bug watches

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