On Tue, Jun 16, 2015 at 02:29:26PM +0200, Dariusz Gadomski wrote:

> The outline for this change is the way the interfaces are handled by
> upstart in Ubuntu. They are all brought up in parallel by independent
> processes, so there was a need for a universal mechanism to ensure the
> proper order of initialization in more complex scenarios.

But is it just ifup <iface1..N> running in parallel, or is there also an
ifup -a running at the same time?

> > [per-interface lockfiles]
> 
> Is this implementation for detecting deadlocks available anywhere for
> examination? The mechanism I implemented takes care of deadlocks by
> enforcing consistent order of interface locking and disables further
> locking in recurrent ifupdown invocations with an env variable.

The implementation can be found in the ifupdown git repository:

https://anonscm.debian.org/git/collab-maint/ifupdown.git

Checkout the "concurrency" branch. Note that it only detects deadlocks
when one outer invocation of ifup or ifdown recursively calls itself
(ie, ifup A -> ifup B -> ifup A). It does not handle the situation when
two simultaneous invocations on different interfaces recursively call
eachother (ie, ifup A -> ifup B at the same time as ifup B -> ifup A).
But it does do proper locking of an interface for the whole time it is
being configured, unlike the older versions of ifupdown which really
allowed two simultaneous invocations of "ifup A" to be run.

> > But in the case of bonding, there is already a mechanism in place that
> > can prevent conflicts between ifup -a and ifup bond0 running
> > simultaneously. If you write /e/n/interfaces like this:
> > 
> > allow-bond0 eth0 eth1
> > [...]
> 
> Is this allow-bond0 stanza also going to work with e.g. vlans launched on
> top of bonding interfaces? In case of parallel interface initialization
> we would like to ensure that vlans are initialized after bonding interfaces
> are brought up.

Hm, looking at the code I don't think so, since a VLAN interface still
runs "ip link set dev bondX up", which may mess with the
if-pre-up.d/ifenslave script. I'll do some tests with the concurrency
branch and VLANs on bonded interfaces to see how well that copes with
it.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <g...@debian.org>

Attachment: signature.asc
Description: Digital signature

Reply via email to