[systemd-devel] network/openvswitch dependency loop/deadlock

Lennart Poettering lennart at poettering.net
Wed Feb 13 11:03:57 PST 2013


On Wed, 13.02.13 08:49, Thomas Graf (tgraf at redhat.com) wrote:

> 
> On 02/13/2013 04:06 AM, Lennart Poettering wrote:
> >Well, there still is a dep loop, that is unfixed, right?
> >
> >I mean, you want your service to run as part of bringing up some
> >networks, but also after the network is up. So what do you want now?
> >Start it after or at the same time, that's contradicting.
> >
> >a) if you want to start it only after then, you should drop those
> >    callouts from ifup.
> >
> >b) if you want to start it as part of the network config, then you
> >    should drop any reference to network.target.
> >
> >To me it appears that you aren't entirely clear which way you want it,
> >and try to use --ignore-dependencies as a work-around for that... But I
> >really think the first step needs to be: what it's gonna be?
> 
> Let's put it in another way, there is two ways to run OVS:
> 
> a) _not_ part of the network config. OVS will load the config from
>    its database when the unit is started, configures itself and
>    then runs. This is a no brainer and requires After=network.target
>    syslog.service

Well, so first of all, no service needs syslog.service anymore. The
socket of syslog is established during early boot, and you should not
add deps for it anymore.

Why is After=network.target actually needed? Shouldn't OVS be capable of
picking up devices as they appear? Device probing is ansynchronous, so
we kinda try to get people away from assuming that there was a point in
time where all devices are finished probing, and we prefer if people
just pick the devices up as they appear... YOu are the libnl guy, I
figure you know that anyway...

> b) As part of the network config scripts. Each virtual bridge, port,
>    tunnel, mirror, and bond has its ifcfg file. This is to allow to
>    ifdown/ifup virtual bridges and ports using a well known interface
>    and persistent storage method.
> 
>    Dependencies:
>      1. interfaces listed in OVSREQUIRES= in each OVS ifcfg must be
>         brought up first to bring up the uplink interfaces for bonds,
>         tunnels, or native uplinks. We do this within ifup.
>      2. openvswitch unit must be started with After=syslog. The
>         dependency on network.target is already resolved in the first
>         step.
>      3. OVS gets configured
>      4. Any remaining interfaces get brought up
> 
> So essentially we need both.

But under different configuration, right?

So, you could either enable that target I mentioned before as a barrier
that is enabled only sometimes, or you could just use two different unit
files for this, and pull in one for the configuration a) and the other
for b)?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list