parser: redefining VLAN interface away from OVS parent results in wrong backend
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Medium
|
Unassigned |
Bug Description
Consider the following netplan configuration:
# /etc/netplan/a.yml
network:
ethernets:
eth0:
openvswitch:
ports:
- [patch0-1, patch1-0]
eth1:
dhcp4: true
vlans:
vlan15:
id: 15
link: eth0
# /etc/netplan/b.yml
network:
vlans:
vlan15:
link: eth1
The expected result would be vlan15 handled by the default renderer, however with the current code it will be handled by OVS.
I could see two acceptable behaviors for this:
* actually do what the user should expect and use the proper renderer, totally discarding the link: eth0 line from a.yml
* error out when trying to redefine a field that's been defined already
I think we already have instances of the latter behavior for other fields? I find it a relatively sensible way to handle this :)
Another idea would be to set the (implicit) OVS renderer in a "postprocessing" stage, after processing the explicit YAML settings, but before validation. And do it only once after all the explicit data has been parsed.