sysconfig rendering ignores vlan name
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:
--network-
--distro=centos --output-
--directory=
$ cat out.test/
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEVICE=eth0
HWADDR=
IPADDR=192.10.1.2
NETMASK=
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
$ cat out.test/
# 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: Needs Information
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 201 lines (+115/-4)3 files modifiedcloudinit/net/sysconfig.py (+30/-1)
tests/unittests/test_distros/test_netconfig.py (+85/-0)
tests/unittests/test_net.py (+0/-3)
Changed in cloud-init: | |
importance: | Undecided → Wishlist |
status: | New → In Progress |
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.