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-mailma…
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
Hi,
I ran into bugs in lazr.config *we* should probably document (top of
schema.cfg would do, I think). I will report the bugs, I guess to
Launchpad? But it will take a while before they do a new release I
suppose.
Details, if you care:
lazr.config, ll. 336-373 contains
_section_name_pattern = re.compile(r"\w[\w.-]+\w")
def _parseSectionName(self, name):
"""Return a tuple of names and kinds embedded in the name.
[snip, same function]
if self._section_name_pattern.match(section_name) is None:
raise InvalidSectionNameError(
r"[%s] name does not match [\w.-]+." % name
)
Note that (1) _section_name_pattern requires that section names be at
least 3 characters (I tried to use "[os]" :-D), and (2) the error
message lies about the regular expression to match. I suggest maybe
- _section_name_pattern = re.compile(r"\w[\w.-]+\w")
+ _section_name_pattern = re.compile(r"\w[\w.-]*\w")
to allow two-character section names, and definitely
- r"[%s] name does not match [\w.-]+." % name
+ r"[%s] name does not match %s."
+ % (name, _section_name_pattern.pattern)
to edit-proof the error message.
--
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan