[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: ShutdownWaitLength vs. 'restart' in init scripts



If the package came from Fedoras repository they may use their own
init-scripts. Contact Fedoras bugreporting.

M


Bill McGonigle wrote:
> Hi folks,
> 
> I noticed a problem with the init script I have with the tor package on
> Fedora 10.  The 'restart' command (just a start and stop) sends a -INT
> to the running process, but doesn't account for ShutdownWaitLength.  It
> looks like the old server instance unbinds, so the new one can start up,
> but then when the old one is really ready to die, it takes them all out,
> which leaves an inconsistent lockfile state and no tor running.  I first
> noticed this on a version upgrade (which runs a 'restart').
> 
> Looks like this:
>   Jun 22 22:09:39.260 [notice] Performing bandwidth self-test...done.
> 
> 
>   Jun 22 22:09:57.620 [notice] Clean shutdown
> 
> So, I'm curious what other folks are doing to handle this.  I'm thinking
> in order of preference:
> 
>  * wait for the pid file to disappear
>  * extract ShutdownWaitLength from the config and wait that long
>  * send a double -INT on stop()
>  * wait 30 seconds
> 
> or, perhaps even better: fixing the server shutdown process so the old
> server can't take out the new server.
> 
> But today is the first time I've ever run a tor relay, and I don't know
> the codebase or what I don't know, so pointers appreciated from those
> who may have already figured this out.
> 
> Thanks,
> -Bill
>