running mailman2 supervised

Hello,
I'm porting a mailman installation from a legacy server into docker.
To make it not more complicated I decided to stay on the same mailman
version 2.1.29 (build from source)
Now I'm faced to the problem that mailman is started with "mailmanctl start"
This fork a daemon running in background. In an ideal docker world
there is only one process per container.
If the process return/end, the container terminate.
For now I solved this by running "fghack mailmanctl start" fghack -> https://cr.yp.to/daemontools/fghack.html
Q1: is there a better way to start mailman in some kind of non forking mode? Q2: is it possible to run mailman3 supervised?
Thanks! Andreas

Hi Andreas,
To Q1, you may look at the code of mailmanctl https://bazaar.launchpad.net/~mailman-coders/mailman/2.1/view/head:/bin/mail... . When you are running using mailmanctl start
, it actually forks more processes for qrunners - maybe you can modify it somehow and write a watcher running in foreground?
To Q2, you can run mailman suite (including mailman3) under Docker - see https://github.com/maxking/docker-mailman for details.
Best, Xiaoxing

Ye Xiaoxing:
that's beyond my skills unfortunately.
But I noticed a smaller bug in mailmanctl: line 314 implement a command-line option "no-start" while lines 43 and 326 name the option "no-restart"
To Q2, you can run mailman suite (including mailman3) under Docker -
see https://github.com/maxking/docker-mailman for details.
thanks for the pointer :-)
Andreas

On 5/22/19 2:03 AM, A. Schulze wrote:
Fixed at <https://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1812>.
Thanks for noticing.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Thu, May 16, 2019, at 5:45 AM, A. Schulze wrote:
Yes, you can run the "master" command in Mailman 3 to run it in foreground instead. That is what we do for Docker images.
I am not super familiar with mailman 2, but it uses the same runners. Perhaps, it is possible to do the same with mailman2?
-- thanks, Abhilash Raj (maxking)

On 5/21/19 12:47 PM, Abhilash Raj wrote:
Mailman 2 is different. There is no "master" command. mailmanctl forks itself and that becomes the master watcher which (re)starts the qrunners However, you can run
qrunner --runner=All
which will not fork and will just loop running all the qrunners in one
process. I.e., instead of mailmanctl start
, just run qrunner --runner=All
which will run as a single process without forking.
Note that this mode of operation is seldom used and may be buggy. In particular, see <https://bugs.launchpad.net/mailman/+bug/1818205> and <https://code.launchpad.net/~mluto/mailman/qrunnersleep/+merge/363767>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Andreas,
To Q1, you may look at the code of mailmanctl https://bazaar.launchpad.net/~mailman-coders/mailman/2.1/view/head:/bin/mail... . When you are running using mailmanctl start
, it actually forks more processes for qrunners - maybe you can modify it somehow and write a watcher running in foreground?
To Q2, you can run mailman suite (including mailman3) under Docker - see https://github.com/maxking/docker-mailman for details.
Best, Xiaoxing

Ye Xiaoxing:
that's beyond my skills unfortunately.
But I noticed a smaller bug in mailmanctl: line 314 implement a command-line option "no-start" while lines 43 and 326 name the option "no-restart"
To Q2, you can run mailman suite (including mailman3) under Docker -
see https://github.com/maxking/docker-mailman for details.
thanks for the pointer :-)
Andreas

On 5/22/19 2:03 AM, A. Schulze wrote:
Fixed at <https://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1812>.
Thanks for noticing.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Thu, May 16, 2019, at 5:45 AM, A. Schulze wrote:
Yes, you can run the "master" command in Mailman 3 to run it in foreground instead. That is what we do for Docker images.
I am not super familiar with mailman 2, but it uses the same runners. Perhaps, it is possible to do the same with mailman2?
-- thanks, Abhilash Raj (maxking)

On 5/21/19 12:47 PM, Abhilash Raj wrote:
Mailman 2 is different. There is no "master" command. mailmanctl forks itself and that becomes the master watcher which (re)starts the qrunners However, you can run
qrunner --runner=All
which will not fork and will just loop running all the qrunners in one
process. I.e., instead of mailmanctl start
, just run qrunner --runner=All
which will run as a single process without forking.
Note that this mode of operation is seldom used and may be buggy. In particular, see <https://bugs.launchpad.net/mailman/+bug/1818205> and <https://code.launchpad.net/~mluto/mailman/qrunnersleep/+merge/363767>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
A. Schulze
-
Abhilash Raj
-
Mark Sapiro
-
Ye Xiaoxing