You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1086
-- Commit Summary --
* pkg/kamailio: Fix of ticket 1085
-- File Changes --
M pkg/kamailio/centos/7/kamailio.service (2) M pkg/kamailio/deb/debian/kamailio.service (2) M pkg/kamailio/deb/jessie/kamailio.service (2) M pkg/kamailio/deb/sid/kamailio.service (2) M pkg/kamailio/deb/stretch/kamailio.service (2) M pkg/kamailio/deb/xenial/kamailio.service (2) M pkg/kamailio/fedora/17/kamailio.service (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1086.patch https://github.com/kamailio/kamailio/pull/1086.diff
This commit message is not describing properly what it adds or fixes. You can add a reference to a bug report, but the commit must have proper description text of what it does. The commit messages are used to generate the changelog files for release. You have to update the commit message in order to get the pull request merged.
@miconda PR updated
@linuxmaniac - are you ok with the changes proposed for deb packaging regarding the systemd?
See my comment at https://github.com/kamailio/kamailio/issues/1085#issuecomment-296592791
What happens if you have a non-working config and you have `on-failure`? I would assume the daemon will be restarted forever
@linuxmaniac yes, unit will be restarted infinity, Rate of restarts may limiter using "RestartSec" keyword
@linuxmaniac we can also mark exit code for broken config as SuccessExitStatus. Than unit will not restart in case of broken config
@linuxmaniac changes is not required. I updated kamailio config and now daemon cannot parse config. System unit not restart as exist `start-limit`
[root@aeyears kamailio]# systemctl status kamailio ● kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server Loaded: loaded (/usr/lib/systemd/system/kamailio.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Sat 2017-04-29 10:20:45 EDT; 4min 50s ago Process: 99917 ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY (code=exited, status=255) Main PID: 99614 (code=exited, status=0/SUCCESS)
Apr 29 10:20:44 aeyears.as50056.net systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. Apr 29 10:20:44 aeyears.as50056.net systemd[1]: Unit kamailio.service entered failed state. Apr 29 10:20:44 aeyears.as50056.net systemd[1]: kamailio.service failed. Apr 29 10:20:45 aeyears.as50056.net systemd[1]: kamailio.service holdoff time over, scheduling restart. Apr 29 10:20:45 aeyears.as50056.net systemd[1]: start request repeated too quickly for kamailio.service Apr 29 10:20:45 aeyears.as50056.net systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server. Apr 29 10:20:45 aeyears.as50056.net systemd[1]: Unit kamailio.service entered failed state. Apr 29 10:20:45 aeyears.as50056.net systemd[1]: kamailio.service failed.
Any resolution on this? Is it breaking things and should be discarded or not?
@linuxmaniac - any spare time soon to review and decide what to do with this PR?
I still don't see why we need this. What is the case of "non null exit"?
From my POV I only want kamailio service to restart if there was a segfault and AFAICT that is already happening with the actual systemd configuration
When kamailio cannot allocate memory (no free memeory on host), then we got non null exit code.
Closed #1086.
I am going to close this. Being interpretable, one can also do local chances of the systemd confs.
@linuxmaniac being the official maintainer of Kamailio debs inside Debian process has the final decision on maintaining those specs.
@sergey-safarov you can make a patch only for rpm specs and can be considered as a dedicated pull request.
@linuxmaniac Well, actually systemd does not restart Kamailio in case of segfault. Just verified this on my system (Debian 9 "stretch"). So I would really want this change merged. For now I manually changed my systemd configuration to "on-failure".