Opened at 2010-12-27T16:24:51Z
Closed at 2011-07-28T21:40:48Z
#738 closed enhancement (fixed)
systemd support
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | BitlBee | Version: | 3.0.1 |
Keywords: | Cc: | ||
IRC client+version: | Client-independent | Operating System: | Public server |
OS version/distro: |
Description
The attached patch enables systemd support in BitlBee. The changes are fully backwards-compatible, the only difference is that when using --systemdsystemunitdir=<something>, systemd files are installed by make install.
See http://0pointer.de/public/systemd-man/daemon.html#id370425
Attachments (4)
Change History (13)
Changed at 2010-12-27T16:25:14Z by
Attachment: | 0001-systemd-install-systemd-unit-files.patch added |
---|
comment:1 Changed at 2010-12-27T19:11:54Z by
Changed at 2010-12-27T19:12:30Z by
Attachment: | 0002-systemd-install-systemd-unit-files.patch added |
---|
comment:2 Changed at 2010-12-27T20:15:19Z by
v3: drop '-i 127.0.0.1' in daemon mode since that can be set from bitlbee.conf
Changed at 2010-12-27T20:15:51Z by
Attachment: | 0003-systemd-install-systemd-unit-files.patch added |
---|
v3
comment:3 Changed at 2011-03-18T00:58:26Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Sorry for keeping you waiting!
comment:4 Changed at 2011-07-25T17:57:52Z by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Changed at 2011-07-25T17:58:26Z by
Attachment: | bitlbee-systemd.patch added |
---|
updated version of the patch
comment:6 follow-up: 7 Changed at 2011-07-27T21:54:49Z by
Uh? Why 1-process daemon mode instead of ForkDaemon? Not a good idea - although I suppose systemd at least monitors its daemons and restarts them when necessary?
comment:7 Changed at 2011-07-27T23:55:08Z by
Replying to wilmer:
Uh? Why 1-process daemon mode instead of ForkDaemon? Not a good idea - although I suppose systemd at least monitors its daemons and restarts them when necessary?
Mostly because of SELinux. We would have to make bitlbee SELinux policy more complicated in ForkDaemon mode. Although I was never persuaded about advantages of ForkDaemon mode anyway. And yes, systemd can be certainly persuaded to start new instances of daemon when one crashes (although I am not sure whether bitlbee is right now configured for that).
comment:8 Changed at 2011-07-28T07:51:54Z by
From systemd.service(5):
Restart= Configures whether the main service process shall be restarted when it exits. Takes one of no, on-success, on-failure, on-abort or always. If set to no (the default) the service will not be restarted when it exits. If set to on-success it will be restarted only when it exited cleanly, i.e. terminated with an exit code of 0. If set to on-failure it will be restarted only when it exited with an exit code not equalling 0, or when terminated by a signal. If set to on-abort it will be restarted only if it exits due to reception of an uncaught signal. If set to always the service will be restarted regardless whether it exited cleanly or not, or got terminated abnormally by a signal.
I guess we want Restart=always
, right?
comment:9 Changed at 2011-07-28T21:40:48Z by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
That's what you'd want for daemon mode yes.
But I'm definitely not going to accept this patch. ForkDaemon is the supported mode of BitlBee. Although the codebase is fairly stable now and daemon mode should be pretty safe, there are still cases of blocking I/O in BitlBee (especially DNS) that also make it less suitable for serving all users from one process.
I'll leave it up to you what you choose for your packages (but yes, please do enable automatic restarting), but not going to change this upstream..
Based on commits from #bitlbee and #systemd, here is an updated patch.
Changes: