[tor-bugs] #19016 [Metrics/CollecTor]: add shutdown hook

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 6 11:16:24 UTC 2016


#19016: add shutdown hook
-------------------------------+---------------------------------
 Reporter:  iwakeh             |          Owner:  iwakeh
     Type:  enhancement        |         Status:  needs_revision
 Priority:  Low                |      Milestone:  CollecTor 1.1.0
Component:  Metrics/CollecTor  |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:  ctip               |  Actual Points:
Parent ID:                     |         Points:
 Reviewer:                     |        Sponsor:
-------------------------------+---------------------------------
Changes (by karsten):

 * status:  needs_review => needs_revision


Comment:

 Looks great!  Here are a few suggestions to make it even better:

  - Would it be possible to catch a second `kill` signal that terminates
 the process immediately?  The tor daemon does this by first giving 30
 seconds to shut down gracefully and shutting down ungracefully upon
 receiving the second kill signal.  Of course, there's always the option to
 `kill -9`, but that might seem like, erm, overkill.

  - Should the log message mention the 20 minutes grace period, like:
 "Waiting up to 20 minutes for termination of running tasks ..."?  If we
 implement the previous suggestion, how about: "Waiting up to 20 minutes
 for termination of running tasks; kill again to terminate immediately
 ..."?

  - How's this change log entry?

 {{{
 diff --git a/CHANGELOG.md b/CHANGELOG.md
 index cf1ea12..ad9da3f 100644
 --- a/CHANGELOG.md
 +++ b/CHANGELOG.md
 @@ -1,7 +1,9 @@
 -# Changes in version 1.1.0 - 2016-08-31
 +# Changes in version 1.1.0 - 2016-09-xx

   * Medium changes
     - Add support for Bifroest's bridge descriptor tarballs.
 +   - Use a shutdown hook that gives currently running modules up to 20
 +     minutes to finish properly, rather than killing them immediately.

   * Minor changes
     - Remove quotes around base URL in index.json.
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19016#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list