Discussion:
[systemd-devel] systemd-networkd and openvswitch?
Richard Maw
2015-05-18 09:32:01 UTC
Permalink
Hi,
is there any possibility to nicely integrate openvswitch to a system
that runs systemd-networkd?
Yes, I did a project involving this because we were integrating OpenStack in a
system that used systemd-networkd primarily for networking.
While I understand that there does not currrently seem to be native
openvswitch support in systemd-networkd, maybe somebody has written unit
files to bring up the openvswitch before systemd-networkd kicks in?
The key thing you need to do is to order before and bring in network-pre.target.

We used the following units:
http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/openstack/usr/lib/systemd/system/openvswitch.service
http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/openstack/usr/lib/systemd/system/openvswitch-db-server.service
http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/openstack/usr/lib/systemd/system/openvswitch-setup.service

The openvswitch-setup service calls an ansible script so that we can do
configuration on first-boot from files dropped in. The script is:
http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/openstack/usr/share/openstack/openvswitch.yml


One unfortunate "gotcha" with doing this is that in all released versions of
systemd-networkd there is a bug which causes networkd to fail if it is started
immediately after a link configuration change. This is not normally a problem
because networkd is usually the only service involved in link configuration.

http://cgit.freedesktop.org/systemd/systemd/commit/?id=d422e52a3523ad0955bec4f9fbed46e234d28590
is the required fix, if you need to backport a patch.
Lennart Poettering
2015-05-18 14:29:08 UTC
Permalink
Hi,
is there any possibility to nicely integrate openvswitch to a system
that runs systemd-networkd? While I understand that there does not
currrently seem to be native openvswitch support in systemd-networkd,
maybe somebody has written unit files to bring up the openvswitch
before systemd-networkd kicks in?
The reason I am trying to do this is that openvswitch is advertised as
being capable to switch an entire dot1q VLAN trunk through to a VM,
something that a standard Linux bridge doesn't seem to do.
Any comments about this?
I don't know ovs that well, but as I mentioned before: if they have an
OK API I think it might make sense to add native ovs support to
networkd (and nspawn).

Lennart
--
Lennart Poettering, Red Hat
Loading...