'netplan get' getting confused with multi-pass parsing

Bug #1981450 reported by Lukas Märdian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan
Triaged
Medium
Unassigned

Bug Description

The `netplan get` CLI can get confused if certain netdefinitions are parsed multiple times (e.g. because they haven't been defined before).

Reproducer:

$ cat tmp/etc/netplan/config.yaml
network:
  bonds:
    bn0:
      interfaces: [br1, br1005]
      routing-policy:
        - from: 10.10.10.42
      routes:
        - to: default
          via: 10.10.10.4
  bridges:
    br1:
      interfaces: []
    br1005:
      interfaces: []

$ netplan get --root-dir=tmp/
network:
  version: 2
  bridges:
    br1: {}
    br1005: {}
  bonds:
    bn0:
      interfaces:
      - br1005
      - br1
      routes:
      - to: "default"
        via: "10.10.10.4"
      routing-policy:
      - from: "10.10.10.42"
      - from: "10.10.10.42"

=> See the duplicate output of "routing-policy.from". The issue goes away if bridges are defined before the bond.

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

I think we might have more bugs of this "multi-pass parsing" type looming in the code-base, so it might be worth doing a bigger investigation to find them all.

Lukas Märdian (slyon)
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