[tor-bugs] #11016 [Tor]: Add support for systemd watchdog protocol

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Feb 24 22:45:09 UTC 2014


#11016: Add support for systemd watchdog protocol
-----------------------------+--------------------------------
     Reporter:  misc         |      Owner:
         Type:  enhancement  |     Status:  needs_revision
     Priority:  minor        |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  tor-relay systemd
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------

Comment (by misc):

 So, to answer questions :

 1) PKG_PROG_PKG_CONFIG come from pkgconfig. it is widly used and portable,
 but indeed, that's external to autoconf, so you could need to add it to
 m4/.

 2) pkgconfig use a file .pc, and this one should be installed with the
 headers. I can add AC_CHECK_HEADER if you think someone would install
 systemd without the .pc but with the header, but I think that's unlikely.
 So if HAVE_SYSTEMD is set, that mean the .pc is here and we can reasonably
 think the headers are here as well.

 3) indeed, will fix

 4) the part about control.c can be dropped. It is just to give a status to
 systemd, but no UI exploit it so far, and it doesn't bring much since it
 will just say "done." most of the time and to me the log is enough. I will
 remove this part and resubmit if I find something that really bring
 something.

 5) yep, and likely also one on the various unit conversion, it did
 surprised me first and so is "non obvious".

 6) watchdog can be more than 2 seconds, yes, and this code is quite buggy.
 I only tested with a watchdog timeout of 1 second, since it was faster to
 see what failed :)
 But I think I will propose to push the watchdog code in libevent as it
 would directly benefit more software than tor ( and the patch I wrote but
 didn't send yet in libevent is a bit more correct:

 {{{
     watchdog_delay /= 2;
     watchdog.tv_sec = watchdog_delay / 1000000;
     watchdog.tv_usec = watchdog_delay % 1000000;
 }}}

 ( but I still need to do a better job on configure.ac before submitting )


 I will rediff later the patch and submit a new version of patch 1. For
 patch 2, depend if you can accept the same kid of feature in libevent (
 ie, send a regular signal to say "still alive" by default in libevent )

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


More information about the tor-bugs mailing list