config: wrap iptables in flock to avoid concurrancy.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 12 Jul 2010 05:41:42 +0000 (15:11 +0930)
committerMichael Adam <obnox@samba.org>
Mon, 7 May 2012 08:50:56 +0000 (10:50 +0200)
commitae5ef4997e474092e1a07ef52ca2f02fb9368bf6
tree7465c14b170c1886af792999976f43a146370d6b
parent10dce70bf8a238702a5b81ffa8ea89edea9fc61f
config: wrap iptables in flock to avoid concurrancy.

When doing a releaseip event, we do them in parallel for all the separate
IPs.  This creates a problem for iptables, which isn't reentrant, giving
the strange message:
iptables encountered unknown error "18446744073709551615" while initializing table "filter"

The worst possible symptom of this is that releaseip won't remove the rule
which prevents us listening to clients during releaseip, and the node will be
healthy but non-responsive.

The simple workaround is to flock-wrap iptables.  Better would be to rework
the code so we didn't need to use iptables in these paths.

CQ:S1018353
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 72d6914ee913272312d7b68f1be5ad05ad06587d)

Signed-off-by: Michael Adam <obnox@samba.org>
config/functions