Hi
> That gremlin has been around for a long time and as you point out below,
> it can happen if the generated script is killed while it is running.
Hmm, just to be clear - are you saying that "shorewall restart" is
*expected* to cause problems in the init script with locking?
("expected" as in, with the current code, not saying it's a deliberate
choice)
I had a tiny glance through the "sh -x" trace because I wasn't quite
clear when the lock file was created - it's not there before either
start or restart, yet one of them creates a lock file.
>> Which corresponds with my init file of:
>>
>> if [ "$COMMAND" = start -o "$COMMAND" = restart ]; then
>
> The above is wrong. Doing a blanket create of ipsets during a restart
> will always result in failures if the ipsets are used in the current
> configuration.
Well, originally I deleted and recreated the ipsets each time, after
some time I decided I just wanted to create any missing entries. It's
just a harmless warning to try and create an already existing ipset
On reflection I still don't understand what is happening here? I
thought "init" was a single script which would be run as a single unit
under a lock? What seems to be happening is that each individual line is
getting individually subjected to some timeout - how is that happening?
Is "ipset" somehow getting intercepted as a function instead of calling
the ipset binary?
>> A follow-on minor gremlin is that if I control-C to kill this, then
>> there is a stale lock file left - this causes some follow on slowness
>> trying to do anything subsequently (a stale lock test might be nice?)
>
> As a workaround, simply remove the lockfile or set MUTEX_TIMEOUT to a
> few seconds.
Thought occurs we could wrap access to the lockfile in a function and in
there check there is a valid process with that pid? If you felt this
was excessive stat-ing and a performance issue then we could solve the
most obvious occurrence by checking of the pid is stale (once) near the
start?
What do you think?
Ed W
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users