Regression: netplan.io does not support managing OpenVPN bridges

Bug #1779341 reported by Johan Ehnberg
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

While systemd supports bringing up independent openvpn services, there is currently no way of declaring these in netplan like it was in /etc/network/interfaces.

Critically, it is no longer feasible to have such a device in a bridge that is declared in netplan.

Related bugs:
https://bugs.launchpad.net/ubuntu/+source/nplan/+bug/1718227
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1779340

As a workaround, it is possible to install networkd-dispatcher and add a script in /usr/lib/networkd-dispatcher/routable.d/ with something like the following:

#!/bin/sh
set -e
if [ "$IFACE" = tap0 ]; then
  brctl addif br1 tap0
  ip link set tap0 promisc on
  ifmetric tap0 5
fi

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netplan.io (Ubuntu):
status: New → Confirmed
Revision history for this message
Martins Pukitis (lieta) wrote :

For me the proposed workaround doesn't work.
On openvpn stop I get:
sep 25 11:21:51 lieta networkd-dispatcher[140803]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('AdministrativeState'): dbus.String('linger', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_314')
sep 25 11:21:51 lieta networkd-dispatcher[140803]: DEBUG:Path '/etc/networkd-dispatcher/linger.d' does not exist; skipping
sep 25 11:21:51 lieta networkd-dispatcher[140803]: DEBUG:Path '/usr/lib/networkd-dispatcher/linger.d' does not exist; skipping
sep 25 11:21:51 lieta networkd-dispatcher[140803]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=14, name='tap0', type='ether', operational='off', administrative='linger') entering state 'linger': no triggers

On openvpn start I get:
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('CarrierState'): dbus.String('off', variant_level=1), dbus.String('OperationalState'): dbus.String('off', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_315')
sep 25 11:22:00 lieta networkd-dispatcher[140803]: WARNING:Unknown index 15 seen, reloading interface list
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:Performed interface scan; state: <Dispatcher({'script_dir': '/etc/networkd-dispatcher:/usr/lib/networkd-dispatcher'})>
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:No change represented by operational state 'off' for interface 'tap0'
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:Signal: typ=dbus.String('org.freedesktop.network1.Link'), data=dbus.Dictionary({dbus.String('AdministrativeState'): dbus.String('unmanaged', variant_level=1)}, signature=dbus.Signature('sv')), path=dbus.ObjectPath('/org/freedesktop/network1/link/_315')
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:Path '/etc/networkd-dispatcher/unmanaged.d' does not exist; skipping
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:Path '/usr/lib/networkd-dispatcher/unmanaged.d' does not exist; skipping
sep 25 11:22:00 lieta networkd-dispatcher[140803]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=15, name='tap0', type='ether', operational='off', administrative='unmanaged') entering state 'unmanaged': no triggers

So none of the networkd-dispatcher get executed.

Revision history for this message
Stephen Fletcher (mridion) wrote :

Cant assign address to tap0 in Ubuntu 20.04 netplan 0.101-0ubuntu3~20.04.2

# cat /etc/systemd/network/90-tap0.netdev
[NetDev]
Name=tap0
Kind=tap

[Tap]
#Group=vhost-net
MultiQueue=yes
PacketInfo=yes

netplan config snippet:
# network: {config: disabled}
network:
    ethernets:
        tap0:
            addresses:
             - 10.255.254.1/24

    version: 2

# netplan apply
# ip addr show dev tap0
5: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 8e:9c:a6:1b:21:f1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8c9c:a6ff:fe1b:21f1/64 scope link
       valid_lft forever preferred_lft forever

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.