parser: redefining VLAN interface away from OVS parent results in wrong backend

Bug #1986652 reported by Simon Chopin
6
This bug affects 1 person
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 :)

Revision history for this message
Lukas Märdian (slyon) wrote :

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.

Changed in netplan:
status: New → Triaged
importance: Undecided → Medium
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.