Code review comment for ~smoser/cloud-init:fix/1788915-vlan-sysconfig-rendering

Revision history for this message
Scott Moser (smoser) wrote :

You're right. I didn't even notice that sysconfig was essentially reading the vlan id from the DEVICE and had no separate way to declare it. Yuck.

I realize I inadvertantly confused things by using a '0' on the 'infra0'. I
had not intended that as any portion of the vlan information, but rather just
"the zeroth infrastructure interface".
Given the original config in the bug:
| 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"]

The entity that provided this network config expected/declared that the system
would/should have two network interfaces. One named 'eth0' and one named
'infra0'.

As I understand it, sysconfig (at least as documented by RHEL) does not allow
us to render this. We could:
a.) configure a system with two interfaces 'eth0' and 'eth0.1001' and leave it
at that, probably warning "sorry not supported, we did the best we could".
b.) configure a system as in 'a' and then arrange for a 'ip link set name' to
occur in some way. (possibly with ifup-post or ifup-local [1])
c.) raise a runtime error and just say "sorry"

Do you see other options?

--
[1] https://www.cyberciti.biz/faq/centos-7-run-script-when-network-interface-is-up-network-manager/

« Back to merge proposal