Hi y'all

Recently there has been a spate of problems with Mailman/systemd
integration.  It appears that (1) the priesthood of systemd is
preparing to deprecate the "simple" and "forking" service types (in
favor of the "notify" type in Mailman's case), and (2) adding "notify"
capability to Mailman is as simple as adding "python-systemd" to
requirements.txt and

    from systemd.daemon import booted, notify

    if booted():                        # check if systemd ran us
        notify("READY=1")
        notify("STATUS=Processing LMTP and REST API")

in the "right" place.

I have not yet communed with the devil on the details (for example, I
don't know how systemd figures out, or even tries, that the "master"
process is notifying it that the "mailman start" command has
succeeded), but this looks promising (and possibly simple at least
from the users' POV).

It is a Cython wrapper of the underlying libsystemd0, so it might be
preferable that the distro packages (pretty much universally available
for recent distro releases) be used where possible rather than wheels
from PyPI.  (Can we do that?)

There are a couple of other notifications, specifically STOPPING,
WATCHDOG, and maybe RELOADING, that we might want to add (as above).

We would need to think carefully about the MariaDB/MySQL issue
documented at
https://docs.mailman3.org/en/latest/install/virtualenv.html#starting-mailman-automatically
Not sure how to deal with that, as MariaDB appears to be lying about
being ready?  Although that probably should be dealt with by catching
the "DB not ready" exception and waiting a few seconds, at least in
the case of MySQL-like databases.

WDOT?


-- 
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source    https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
_______________________________________________
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to