[systemd-devel] systemd-networkd and openvswitch?
Richard Maw
richard.maw at codethink.co.uk
Mon May 18 02:32:01 PDT 2015
On Sat, May 16, 2015 at 01:39:34PM +0200, Marc Haber wrote:
> 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.
More information about the systemd-devel
mailing list