Run services with supervisor#631
Conversation
|
@LukeAllen this is a nice step forward. Supervisor does a good job managing processes, let me know if I can help in any way. |
|
@gegere thanks! If you could figure out what went wrong in the automated test, that would be really helpful. It looks like the TravisCI automated test is failing at a different point than on my machine, so I'm kind of confused. |
|
Restarted build. |
|
I reproduced the issue locally. Will try to have a look. |
|
Note that there's no more |
|
Problem seems related to Dovecot. I tried multiple times and its not always the same container which stops. But I can always see the same thing in the logs: |
|
The output of |
|
I guess services have to be launched in background mode, and supervisor in foreground. |
|
Yeah people usually run supervisor in the foreground for docker containers, but it can run in the background too. I ran it in the background to stay compatible with your existing startup script. I replaced the old init.d calls with |
|
You can add |
|
Hi @LukeAllen, any update on this? |
|
I fixed the dovecot problem. The issue was that in some configurations, |
|
HI @LukeAllen, it seems that a lot of tests are not passing |
|
@LukeAllen do you need help getting this done? I think we should check whether the tasks could run in foreground mode or not. If so (notifications and errors are mapped to stdout and stderr) we should set the following to each supervisord definition: Benefit would be that we would have 1 interface for all logging informations. @tomav what do you think about that? |
|
@alinmear good idea; I incorporated your logging suggestion. Thanks for the help offer; yeah I could use some help. I'm having trouble understanding these tests. I've verified that the processes are actually all running, and the container can send mail, so my guess is that some of the tests might make assumptions that aren't true any more. Not sure though. |
|
@LukeAllen will try to check this on the weekend! |
|
Another possibility would be to use baseimage-docker by phusion which was designed specifically for this purpose (and other enhancements). Maybe they've already solved the problem and we don't need to reinvent the wheel? I would be willing to invest some time into this. The docker image is perfect for running a mailserver, but I am unsure about dependability and resiliance against service failures... |
|
Hi all, I have rebased the changes from @LukeAllen on the new master branch and did some switching of the flow. Could someone take a review of my changes on top of the @LukeAllen branch issue-631-run-services-with-supervisor and give out some ideas if some changes are needed before I wrap it up? When done I need to make a new pull request or what is the procedure of it? |
|
Solved all tests, see PR #676 because I could not make a PR on this PR. |
|
Awesome thanks @johansmitsnl; I was having trouble understanding those tests. Closing this PR now since PR #676 incorporates it. |
With this change, most of the services are run via supervisor, so they'll be automatically restarted if they die. Fixes #434 and #575
Note that to run the processes with supervisor I had to use the 'run in foreground' version of their start commands, rather than the init.d script that was used before. @tomav you should verify that I haven't lost any special configurations you had for those services.
Also, I added tests, but I'm having an error actually running the automated test suite on my machine. The problem seems unrelated to my changes. When I run
make, the containermailfails to stay up. It looks like its start-mailserver.sh is exiting with this error:Is any special environment required to run
make?