#1108627 netplan.io: Open vSwitch Internal Port generation issue

Package:
netplan.io
Source:
netplan.io
Description:
YAML network configuration abstraction for various backends
Submitter:
Philippe Latu
Date:
2026-09-12 16:59:01 UTC
Severity:
normal
#1108627#5
Date:
2025-07-01 18:12:22 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
     When attempting to generate VLAN routed interfaces as
     openvswitch-switch internal ports, Netplan wants to create bridges
     instead.

   * What exactly did you do?
     Here is a copy of the YAML declaration file: /etc/netplan/30-dsw-host.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1: {dhcp4: false, dhcp6: false}
    eno2: {dhcp4: false, dhcp6: false}
    eno3: {dhcp4: false, dhcp6: false}
    eno4: {dhcp4: false, dhcp6: false}
  bonds:
    bond0:
      interfaces: [eno1, eno2, eno3, eno4]
      mtu: 9000
      openvswitch:
        lacp: active  # Uses 802.3ad mode with LACP
  bridges:
    dsw-host:
      interfaces: [bond0, vlan3, vlan44]
      mtu: 9000
      openvswitch: {}
      dhcp4: false
      dhcp6: false
  vlans:
    vlan3:
      id: 3
      link: dsw-host
      openvswitch: {}
      addresses:
        - 172.16.0.4/23
        - 2001:db8:3::4/64
        - fe80::3:4/64
      routes:
        - to: default
          via: 172.16.0.2
        - to: "::/0"
          via: fe80::3:2
          on-link: true
      nameservers:
        addresses: [172.16.0.2, fe80::3:2]
    vlan44:
      id: 44
      link: dsw-host
      openvswitch: {}
      addresses:
        - 192.168.44.1/22
        - 2001:db8:2c::1/64
        - fe80::2c:1/64

   * What was the outcome of this action?
     After running sudo netplan apply, we get:

systemctl --failed
  UNIT                       LOAD   ACTIVE SUB    DESCRIPTION
● netplan-ovs-vlan3.service  loaded failed failed OpenVSwitch configuration for vlan3
● netplan-ovs-vlan44.service loaded failed failed OpenVSwitch configuration for vlan44

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

2 loaded units listed.

systemctl status netplan-ovs-vlan3.service
× netplan-ovs-vlan3.service - OpenVSwitch configuration for vlan3
     Loaded: loaded (/run/systemd/system/netplan-ovs-vlan3.service; enabled-runtime; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2025-07-01 19:43:44 CEST; 23min ago
 Invocation: b8dbb6573f8e41e9b785d413a41afa2e
    Process: 12207 ExecStart=/usr/bin/ovs-vsctl --may-exist add-br vlan3 dsw-host 3 (code=exited, status=1/FAILURE)
   Main PID: 12207 (code=exited, status=1/FAILURE)
   Mem peak: 7.5M
        CPU: 35ms

juil. 01 19:43:44 trudy systemd[1]: Starting netplan-ovs-vlan3.service - OpenVSwitch configuration for vlan3...
juil. 01 19:43:44 trudy ovs-vsctl[12207]: ovs|00001|vsctl|INFO|Called as /usr/bin/ovs-vsctl --may-exist add-br vlan3 dsw-host 3
juil. 01 19:43:44 trudy ovs-vsctl[12207]: ovs-vsctl: cannot create a bridge named vlan3 because a port named vlan3 already exists on bridge dsw-host
juil. 01 19:43:44 trudy ovs-vsctl[12207]: ovs|00002|db_ctl_base|ERR|cannot create a bridge named vlan3 because a port named vlan3 already exists on bridge dsw-host
juil. 01 19:43:44 trudy systemd[1]: netplan-ovs-vlan3.service: Main process exited, code=exited, status=1/FAILURE
juil. 01 19:43:44 trudy systemd[1]: netplan-ovs-vlan3.service: Failed with result 'exit-code'.
juil. 01 19:43:44 trudy systemd[1]: Failed to start netplan-ovs-vlan3.service - OpenVSwitch configuration for vlan3.


   * What outcome did you expect instead?
     The netplan generation should conform to the already existing OvS configuration:

sudo ovs-vsctl show | grep -A1 vlan3
        Port vlan3
            tag: 3
            Interface vlan3
                type: internal

sudo ovs-vsctl list port vlan3
_uuid               : cad0ada3-aa56-4442-be03-f20c20bfe22e
bond_active_slave   : []
bond_downdelay      : 0
bond_fake_iface     : false
bond_mode           : []
bond_updelay        : 0
cvlans              : []
external_ids        : {}
fake_bridge         : false
interfaces          : [d7fa32fa-f521-4dca-9690-29051ccd477b]
lacp                : []
mac                 : []
name                : vlan3
other_config        : {}
protected           : false
qos                 : []
rstp_statistics     : {}
rstp_status         : {}
statistics          : {}
status              : {}
tag                 : 3
trunks              : []
vlan_mode           : access

ip a ls dev vlan3
15: vlan3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether ca:e8:6c:cf:cb:88 brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.4/23 brd 172.16.1.255 scope global vlan3
       valid_lft forever preferred_lft forever
    inet6 2001:db8:3::4/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::3:4/64 scope link
       valid_lft forever preferred_lft forever

#1108627#10
Date:
2026-09-12 16:48:14 UTC
From:
To:
Hello,

I have finally found a solution to the issue with my netplan.io
configuration file.

The configuration file for the bug report had a circular dependency on
the bridge.
Under bridges.dsw-host.interfaces, I wrote [bond0, vlan3, vlan44].
However, VLAN3 and VLAN44 already have 'link: dsw-host'. Listing them in
interfaces causes Netplan to generate an ovs-vsctl add-port command on
interfaces that do not exist before the bridge is created, resulting in
the netplan-ovs-dsw-host.service failing immediately. Only 'bond0'
should be listed in 'interfaces'.

Here is a working copy of the netplan declaration file:

network:
   version: 2
   renderer: networkd

   ethernets:
     eno1: {dhcp4: false, dhcp6: false, mtu: 9000}
     eno2: {dhcp4: false, dhcp6: false, mtu: 9000}
     eno3: {dhcp4: false, dhcp6: false, mtu: 9000}
     eno4: {dhcp4: false, dhcp6: false, mtu: 9000}

   bonds:
     bond0:
       interfaces: [eno1, eno2, eno3, eno4]
       parameters:
         mode: balance-tcp
       mtu: 9000
       openvswitch:
         lacp: active  # Uses 802.3ad mode with LACP

   bridges:
     dsw-host:
       interfaces: [bond0]
       mtu: 9000
       openvswitch: {}
       dhcp4: false
       dhcp6: false

   vlans:
     vlan3:
       mtu: 9000
       dhcp4: false
       dhcp6: false
       accept-ra: false
       id: 3
       link: dsw-host
       openvswitch: {}
       addresses:
         - 172.16.0.4/23
         - 2001:678:3fc:3::4/64
         - fe80::3:4/64
       routes:
         - to: default
           via: 172.16.0.2
         - to: "::/0"
           via: fe80::3:2
           on-link: true
       nameservers:
         addresses: [172.16.0.2, fe80::3:2]

     vlan44:
       dhcp4: false
       dhcp6: false
       accept-ra: false
       id: 44
       link: dsw-host
       openvswitch: {}
       addresses:
         - 198.18.44.1/22
         - 2001:678:3fc:2c::1/64
         - fe80::2c:1/64

Sorry for the noise.

Regards,