Skip to content

Draft: manager: experimental implementation of supervisord extension to support sd_notify()

Code in this merge request is mainly for experimental purposes around #739 (closed) . I am not sure this is the way forward and I wanted to get more data about this direction of development, so I just tried to implement something.


What's the goal of this attempt?

Replace systemd with supervisord extended with additional features:

  • support sd_notify from libsystemd

Known problems

  • It works, but only in the best case scenario. All possible errors are not handled. The code is written to work, not to be maintainable and to handle all cases.
  • there is currently no proper way to work with the python module written in C

What does this experiment tell us?

Patching supervisord is a feasible direction of development. It complicates packaging a bit due to the C module, but other than that, it looks quite good. Monkeypatching supervisord is the sketchiest parts of this idea, however I expect it to be quite stable as the patched code has not been changed for around 10 years.

As for amount of work needed to finish this. It took me something like 5 hours to get here. Most of the time was spent debugging and digging through supervisord's code. Using Pareto principle again, it would take 20 more hours to finish. Double it for safety, so in 40h we could have solution for #739 (closed). My gut feeling is that this is a huge overestimate.

What would this approach to fixing #739 (closed) give us?

  • control over how everything is executed
  • solve problem with privileges
  • ability to run in Docker and any systemd-less environment
  • some critical bugs to smash
  • uncertainty about breakage with supervisord updates
  • ???

How to try it out?

Make sure you have poetry installed and that manager can be run with poe run.

  • make in manager/knot_resolver_manager/kresd_controller/supervisord/plugin (if fails, edit makefile to change include paths)
  • poe run

Merge request reports