ShutdownWaitLength vs. 'restart' in init scripts

Bill McGonigle bill at bfccomputing.com
Tue Jun 23 04:47:56 UTC 2009


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

-- 
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
http://www.bfccomputing.com/    Cell: 603.252.2606
Twitter, etc.: bill_mcgonigle   Page: 603.442.1833
Email, IM, VOIP: bill at bfccomputing.com
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf



More information about the tor-talk mailing list