systemd-networkd can't add a VLAN interface to bridge

Bug #1657837 reported by Major Hayden
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

This is apparently fixed in systemd 231:

   https://lists.freedesktop.org/archives/systemd-devel/2016-August/037385.html

When systemd tries to put a VLAN interface into a bridge on Xenial, it fails:

# journalctl --boot -u systemd-networkd
Jan 15 09:16:46 hydrogen systemd[1]: Started Network Service.
Jan 15 09:16:46 hydrogen systemd-networkd[1903]: br-mgmt: netdev exists, using existing without changing its parameters
Jan 15 09:16:46 hydrogen systemd-networkd[1903]: br-mgmt: Could not append VLANs: Operation not permitted
Jan 15 09:16:46 hydrogen systemd-networkd[1903]: br-mgmt: Failed to assign VLANs to bridge port: Operation not permitted
Jan 15 09:16:46 hydrogen systemd-networkd[1903]: br-mgmt: Could not set bridge vlan: Operation not permitted
Jan 15 09:16:59 hydrogen systemd-networkd[1903]: enp3s0: Configured
Jan 15 09:16:59 hydrogen systemd-networkd[1903]: enp2s0: Configured

Here are the systemd-networkd configs I used:

root@hydrogen:/etc/systemd/network# cat enp3s0.network
[Match]
Name=enp3s0

[Network]
VLAN=vlan10
root@hydrogen:/etc/systemd/network# cat vlan10.netdev
[NetDev]
Name=vlan10
Kind=vlan

[VLAN]
Id=10
root@hydrogen:/etc/systemd/network# cat vlan10.network
[Match]
Name=vlan10

[Network]
Bridge=br-mgmt
root@hydrogen:/etc/systemd/network# cat br-mgmt.netdev
[NetDev]
Name=br-mgmt
Kind=bridge
root@hydrogen:/etc/systemd/network# cat br-mgmt.network
[Match]
Name=br-mgmt

[Network]
Address=172.29.236.21/22

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

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

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
kpiq (pserrano) wrote :
Download full text (3.5 KiB)

Nope, it is still a problem in "systemd 231-9ubuntu4 amd64". Actually, it seems like multiple features documented in the Ubuntu Manpages for systemd.network are not functioning. Below are some error messages (journalctl -a -u systemd-networkd), followed by the configuration files.

ERROR MESSAGES - START
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0p1: MAC configured for tap, ignoring
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0p0: MAC configured for tap, ignoring
may 01 11:34:31 ps01lnx systemd-networkd[30661]: [/etc/systemd/network/7-ovsbr0lcl1.netdev:8] Unknown lvalue 'DefaultPVID' in section 'Bridge'
may 01 11:34:31 ps01lnx systemd-networkd[30661]: [/etc/systemd/network/7-ovsbr0lcl1.netdev:10] Unknown lvalue 'STP' in section 'Bridge'
may 01 11:34:31 ps01lnx systemd-networkd[30661]: NetDev with invalid Kind configured in /etc/systemd/network/3-vlan1.netdev. Ignoring
may 01 11:34:31 ps01lnx systemd-networkd[30661]: [/etc/systemd/network/9-ovsbr0p1.network:9] Unknown lvalue 'bridge' in section 'Network'
may 01 11:34:31 ps01lnx systemd-networkd[30661]: [/etc/systemd/network/9-ovsbr0p0.network:9] Unknown lvalue 'bridge' in section 'Network'
ERROR MESSAGES - END

SYSTEMD CONFIGURATION

systemctl enable systemd-networkd

===========
 /etc/systemd/network/3-vlan1.netdev
===========

[Netdev]
Name=br0vlan1
Kind=vlan

[VLAN]
Id=1

===========
 /etc/systemd/network/3-vlan1.network
===========

[Match]
Name=br0vlan1

[Network]
Bridge=ovsbr0lcl1

===========
 /etc/systemd/network/7-ovsbr0lcl1.netdev
===========

[NetDev]
Name=ovsbr0lcl1
Kind=bridge
MTUBytes=8996
MACAddress=52:54:00:5a:9e:90

[Bridge]
DefaultPVID=1
VLANFiltering=true
STP=false

===========
 /etc/systemd/network/7-ovsbr0p0.netdev
===========

[NetDev]
Name=ovsbr0p0
Kind=tap
MACAddress=52:54:00:5a:9e:92

===========
 /etc/systemd/network/7-ovsbr0p1.netdev
===========

[NetDev]
Name=ovsbr0p1
Kind=tap
MACAddress=52:54:00:5a:9e:93

===========
 /etc/systemd/network/8-ovsbr0lcl1.link
===========

[Match]
MACAddress=52:54:00:5a:9e:90
OriginalName=ovsbr0lcl1
Driver=bridge

[Link]
Name=ovsbr0lcl1
Alias=br0lcl1
MACAddressPolicy=persistent
MTUBytes=8996

===========
 /etc/systemd/network/8-ovsvbr0p0.link
===========

[Match]
OriginalName=ovsbr0p0
MACAddress=52:54:00:5a:9e:92

[Link]
MTUBytes=8996
MACAddress=52:54:00:5a:9e:92

===========
 /etc/systemd/network/8-ovsvbr0p1.link
===========

[Match]
OriginalName=ovsbr0p1

[Link]
MTUBytes=8996
MACAddress=52:54:00:5a:9e:93

===========
 /etc/systemd/network/9-ovsbr0lcl1.network
===========

[Match]
Name=ovsbr0lcl1
MACAddress=52:54:00:5a:9e:90

[Link]
MACAddress=52:54:00:5a:9e:90
MTUBytes=8996

[Network]
DHCP=no
Address=192.168.56.1/24
LinkLocalAddressing=no
MulticastDNS=false
IPv6AcceptRA=false

===========
 /etc/systemd/network/9-ovsbr0p0.network
===========

[Match]
Name=ovsbr0p0

[Link]
MACAddress=52:54:00:5a:9e:92
MTUBytes=8996

[Network]
bridge=ovsbr0lcl1
Address=192.168.56.2/24
LinkLocalAddressing=no
MulticastDNS=false
IPv6Acce...

Read more...

Revision history for this message
kpiq (pserrano) wrote :

And the error messages pertinent to the issue with the VLAN are:

=================================================

may 01 11:34:31 ps01lnx systemd[1]: Started Network Service.
may 01 11:34:31 ps01lnx systemd[1]: systemd-networkd.service: Failed to send unit change signal for systemd-networkd.service: Connection reset by peer
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0lcl1: IPv6 disabled for interface: Success
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0lcl1: Could not append VLANs: Operation not permitted
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0lcl1: Failed to assign VLANs to bridge port: Operation not permitted
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0lcl1: Could not set bridge vlan: Operation not permitted
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0p0: IPv6 disabled for interface: Success
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0p1: IPv6 disabled for interface: Success
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0lcl1: Configured
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0p0: Configured
may 01 11:34:31 ps01lnx systemd-networkd[30661]: ovsbr0p1: Configured

=================================================

As you can see, the bridge and the two ports (tap devices) were configured. But the bridge VLAN did not receive the intended configuration, and the tap devices failed to be associated with the bridge.

Revision history for this message
kpiq (pserrano) wrote :

ahhhhh... never mind. I was using the systemd netdev, link and network documentation for Ubuntu 17.04, when my system is on 16.10. My apologies.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Confirmed → Won't Fix
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.