Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #11016

Closed (moved)
Open
Opened Feb 22, 2014 by Trac@tracbot

Add support for systemd watchdog protocol

Systemd provides a watchdog protocol, as described on http://0pointer.de/blog/projects/watchdog.html . It basically requires the service to write a message to a socket every X second, if some environment variables are set. While present since a long time, the newer v209 version provides a helper function to implement it, by moving the parsing logic in a library.

So here is 2 patches for tor :

The first one implement the Notify protocol for systemd, thus permitting people to use Type=notify in the systemd unit ( see http://www.freedesktop.org/software/systemd/man/systemd.service.html for the detail, as well as the rather lengthy debate on Debian init system for Jessie ). The patch is not doing much or adding much features, but I guess some people would prefer to have this Type of systemd unit rather than simple as it could prevent some race condition if a service requires tor to be really started and working, before being started himself. It also add status line to systemd, but that's not a feature that is currently used much ( I do hope maybe some higher level tool like cockpit would use it later ).

The 2nd one is adding a event to the main loop to ping the watchdog on a regular basis, using the new function in libsystemd-daemon. So this way, if tor is stuck, it will be restarted. I guess I do not have to explain how and why this improve tor :)

So far, I only have been able to test the first one on my Fedora 20 and I am waiting for package to test the 2nd one in real life. However, in order to release early, release often, I upload them here for review.

Trac:
Username: misc

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.6.x-final
Milestone
Tor: 0.2.6.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#11016