[Bug 2013532] Re: netplan ignores routes

Lukas Märdian 2013532 at bugs.launchpad.net
Mon Apr 3 13:25:11 UTC 2023


** Also affects: netplan.io (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: netplan.io (Ubuntu Kinetic)
   Importance: Undecided
       Status: New

** Also affects: netplan.io (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Changed in: netplan.io (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/2013532

Title:
  netplan ignores routes

Status in netplan:
  Fix Released
Status in netplan.io package in Ubuntu:
  Fix Released
Status in netplan.io source package in Jammy:
  New
Status in netplan.io source package in Kinetic:
  New

Bug description:
  I have 2 files in /etc/netplan. One is generated by cloud-init
  (50-cloud-init.yaml), but it is not complete. Therefore I added a
  second file (60-static.yaml) to supply IPv6 address and default route.
  Cloud-init doesn't have this information, or ignores it (that is not
  the issue here).

  When "netplan generate" or "netplan get" runs, it ignores the route
  from the second file.

  Example:

  # This file is generated from information provided by the datasource.  Changes
  # to it will not persist across an instance reboot.  To disable cloud-init's
  # network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  network:
      version: 2
      ethernets:
          net0:
              addresses:
              - 1.1.1.1/24    # not the real address of course
              match:
                  macaddress: 11:11:11:11:11:11
              nameservers:
                  addresses:
                  - 8.8.8.8
                  - 8.8.4.4
                  search: []
              routes:
              -   to: default
                  via: 1.2.3.4
              set-name: net0

  The other file 60-static.yaml:

  network:
      version: 2
      ethernets:
          net0:
              addresses:
              - "2a02:eeee:eeee:eeee::2/64"
              routes:
              - to: "::/0"
                via: 2a02:eeee:eeee:eeee::1
                on-link: true

  
  When getting the configuration:

  $ netplan get
  network:
    version: 2
    ethernets:
      net0:
        match:
          macaddress: "11:11:11:11:11:11"
        addresses:
        - "1.1.1.1/24"
        - "2a02:eeee:eeee:eeee::2/64"
        nameservers:
          addresses:
          - 8.8.8.8
          - 8.8.4.4
          search: []
        set-name: "net0"
        routes:
        - to: "default"
          via: "1.2.3.4"

  The route from the second file is completely ignored.

  Strangely enough, if you list multiple routes in the second file, the
  result does contain all of them.

To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/2013532/+subscriptions




More information about the foundations-bugs mailing list