Module: kamailio
Branch: 5.2
Commit: 33fb7ac2b367b4145815ed6e6919deb8d7c8631d
URL: https://github.com/kamailio/kamailio/commit/33fb7ac2b367b4145815ed6e6919deb…
Author: Kevin Olbrich <ko(a)sv01.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-11-08T18:04:54+01:00
pkg/kamailio/deb: also restart service if unclean exit code
New:
If set to on-failure, the service will be restarted when the process exits with a non-zero exit code, is terminated by a signal (including on core dump, but excluding the aforementioned four signals), when an operation (such as service reload) times out, and when the configured watchdog timeout is triggered.
Old:
If set to on-abort, the service will be restarted only if the service process exits due to an uncaught signal not specified as a clean exit status.
https://www.freedesktop.org/software/systemd/man/systemd.service.html
Signed-off-by: Kevin Olbrich <ko(a)sv01.de>
(cherry picked from commit a5c45d1af4bf31e872963a954c43b8ee5618a90a)
---
Modified: pkg/kamailio/deb/bionic/kamailio.service
Modified: pkg/kamailio/deb/buster/kamailio.service
Modified: pkg/kamailio/deb/debian/kamailio.service
Modified: pkg/kamailio/deb/jessie/kamailio.service
Modified: pkg/kamailio/deb/sid/kamailio.service
Modified: pkg/kamailio/deb/stretch/kamailio.service
Modified: pkg/kamailio/deb/xenial/kamailio.service
---
Diff: https://github.com/kamailio/kamailio/commit/33fb7ac2b367b4145815ed6e6919deb…
Patch: https://github.com/kamailio/kamailio/commit/33fb7ac2b367b4145815ed6e6919deb…
Module: kamailio
Branch: 5.2
Commit: 9bc520a02428656c8eb0a5d875c950298ceaf2e7
URL: https://github.com/kamailio/kamailio/commit/9bc520a02428656c8eb0a5d875c9502…
Author: Kevin Olbrich <ko(a)sv01.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-11-08T18:05:28+01:00
pkg/kamailio/oracle: wait for network to be up
Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it. This target unit is intended to pull in a service that delays further execution until the network is sufficiently set up. What precisely this requires is left to the implementation of the network managing service.
https://www.freedesktop.org/software/systemd/man/systemd.special.htmlhttps://lists.kamailio.org/pipermail/sr-users/2018-November/103668.html
Signed-off-by: Kevin Olbrich <ko(a)sv01.de>
(cherry picked from commit 37c2e5ca25cb3396d2ac969271f9f9330d88fd63)
---
Modified: pkg/kamailio/oracle/el7/kamailio.service
---
Diff: https://github.com/kamailio/kamailio/commit/9bc520a02428656c8eb0a5d875c9502…
Patch: https://github.com/kamailio/kamailio/commit/9bc520a02428656c8eb0a5d875c9502…
---
diff --git a/pkg/kamailio/oracle/el7/kamailio.service b/pkg/kamailio/oracle/el7/kamailio.service
index 63d6da747c..8192488b53 100644
--- a/pkg/kamailio/oracle/el7/kamailio.service
+++ b/pkg/kamailio/oracle/el7/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio SIP router server daemon
-After=syslog.target network.target auditd.service
+Wants=network-online.target
+After=syslog.target network-online.target auditd.service
[Service]
EnvironmentFile=/etc/sysconfig/kamailio
Module: kamailio
Branch: 5.2
Commit: fb9dee9efee7f832c7c95fab2d066fb3606b1fa8
URL: https://github.com/kamailio/kamailio/commit/fb9dee9efee7f832c7c95fab2d066fb…
Author: Kevin Olbrich <ko(a)sv01.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-11-08T18:04:49+01:00
pkg/kamailio/deb: wait for network to be up
Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it. This target unit is intended to pull in a service that delays further execution until the network is sufficiently set up. What precisely this requires is left to the implementation of the network managing service.
https://www.freedesktop.org/software/systemd/man/systemd.special.htmlhttps://lists.kamailio.org/pipermail/sr-users/2018-November/103668.html
Signed-off-by: Kevin Olbrich <ko(a)sv01.de>
(cherry picked from commit f7867838eb8a68a9ae4c00f2487bdec078b94c88)
---
Modified: pkg/kamailio/deb/bionic/kamailio.service
Modified: pkg/kamailio/deb/buster/kamailio.service
Modified: pkg/kamailio/deb/debian/kamailio.service
Modified: pkg/kamailio/deb/jessie/kamailio.service
Modified: pkg/kamailio/deb/sid/kamailio.service
Modified: pkg/kamailio/deb/stretch/kamailio.service
Modified: pkg/kamailio/deb/xenial/kamailio.service
---
Diff: https://github.com/kamailio/kamailio/commit/fb9dee9efee7f832c7c95fab2d066fb…
Patch: https://github.com/kamailio/kamailio/commit/fb9dee9efee7f832c7c95fab2d066fb…
---
diff --git a/pkg/kamailio/deb/bionic/kamailio.service b/pkg/kamailio/deb/bionic/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/bionic/kamailio.service
+++ b/pkg/kamailio/deb/bionic/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/buster/kamailio.service b/pkg/kamailio/deb/buster/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/buster/kamailio.service
+++ b/pkg/kamailio/deb/buster/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/debian/kamailio.service b/pkg/kamailio/deb/debian/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/debian/kamailio.service
+++ b/pkg/kamailio/deb/debian/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/jessie/kamailio.service b/pkg/kamailio/deb/jessie/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/jessie/kamailio.service
+++ b/pkg/kamailio/deb/jessie/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/sid/kamailio.service b/pkg/kamailio/deb/sid/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/sid/kamailio.service
+++ b/pkg/kamailio/deb/sid/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/stretch/kamailio.service b/pkg/kamailio/deb/stretch/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/stretch/kamailio.service
+++ b/pkg/kamailio/deb/stretch/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/xenial/kamailio.service b/pkg/kamailio/deb/xenial/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/xenial/kamailio.service
+++ b/pkg/kamailio/deb/xenial/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Please see conversation on ML for reference:
https://lists.kamailio.org/pipermail/sr-users/2018-November/103668.html
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1716
-- Commit Summary --
* Wait for network to be up before starting kamailio.service
* Restart service if it fails with unclean exit code instead of only unclean signal
-- File Changes --
M pkg/kamailio/deb/bionic/kamailio.service (5)
M pkg/kamailio/deb/buster/kamailio.service (5)
M pkg/kamailio/deb/debian/kamailio.service (5)
M pkg/kamailio/deb/jessie/kamailio.service (5)
M pkg/kamailio/deb/sid/kamailio.service (5)
M pkg/kamailio/deb/stretch/kamailio.service (5)
M pkg/kamailio/deb/xenial/kamailio.service (5)
M pkg/kamailio/oracle/el7/kamailio.service (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1716.patchhttps://github.com/kamailio/kamailio/pull/1716.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1716
Module: kamailio
Branch: master
Commit: 37c2e5ca25cb3396d2ac969271f9f9330d88fd63
URL: https://github.com/kamailio/kamailio/commit/37c2e5ca25cb3396d2ac969271f9f93…
Author: Kevin Olbrich <ko(a)sv01.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-11-08T18:02:32+01:00
pkg/kamailio/oracle: wait for network to be up
Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it. This target unit is intended to pull in a service that delays further execution until the network is sufficiently set up. What precisely this requires is left to the implementation of the network managing service.
https://www.freedesktop.org/software/systemd/man/systemd.special.htmlhttps://lists.kamailio.org/pipermail/sr-users/2018-November/103668.html
Signed-off-by: Kevin Olbrich <ko(a)sv01.de>
---
Modified: pkg/kamailio/oracle/el7/kamailio.service
---
Diff: https://github.com/kamailio/kamailio/commit/37c2e5ca25cb3396d2ac969271f9f93…
Patch: https://github.com/kamailio/kamailio/commit/37c2e5ca25cb3396d2ac969271f9f93…
---
diff --git a/pkg/kamailio/oracle/el7/kamailio.service b/pkg/kamailio/oracle/el7/kamailio.service
index 63d6da747c..8192488b53 100644
--- a/pkg/kamailio/oracle/el7/kamailio.service
+++ b/pkg/kamailio/oracle/el7/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio SIP router server daemon
-After=syslog.target network.target auditd.service
+Wants=network-online.target
+After=syslog.target network-online.target auditd.service
[Service]
EnvironmentFile=/etc/sysconfig/kamailio
Module: kamailio
Branch: master
Commit: a5c45d1af4bf31e872963a954c43b8ee5618a90a
URL: https://github.com/kamailio/kamailio/commit/a5c45d1af4bf31e872963a954c43b8e…
Author: Kevin Olbrich <ko(a)sv01.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-11-08T18:02:32+01:00
pkg/kamailio/deb: also restart service if unclean exit code
New:
If set to on-failure, the service will be restarted when the process exits with a non-zero exit code, is terminated by a signal (including on core dump, but excluding the aforementioned four signals), when an operation (such as service reload) times out, and when the configured watchdog timeout is triggered.
Old:
If set to on-abort, the service will be restarted only if the service process exits due to an uncaught signal not specified as a clean exit status.
https://www.freedesktop.org/software/systemd/man/systemd.service.html
Signed-off-by: Kevin Olbrich <ko(a)sv01.de>
---
Modified: pkg/kamailio/deb/bionic/kamailio.service
Modified: pkg/kamailio/deb/buster/kamailio.service
Modified: pkg/kamailio/deb/debian/kamailio.service
Modified: pkg/kamailio/deb/jessie/kamailio.service
Modified: pkg/kamailio/deb/sid/kamailio.service
Modified: pkg/kamailio/deb/stretch/kamailio.service
Modified: pkg/kamailio/deb/xenial/kamailio.service
---
Diff: https://github.com/kamailio/kamailio/commit/a5c45d1af4bf31e872963a954c43b8e…
Patch: https://github.com/kamailio/kamailio/commit/a5c45d1af4bf31e872963a954c43b8e…
Module: kamailio
Branch: master
Commit: f7867838eb8a68a9ae4c00f2487bdec078b94c88
URL: https://github.com/kamailio/kamailio/commit/f7867838eb8a68a9ae4c00f2487bdec…
Author: Kevin Olbrich <ko(a)sv01.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2018-11-08T18:02:32+01:00
pkg/kamailio/deb: wait for network to be up
Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it. This target unit is intended to pull in a service that delays further execution until the network is sufficiently set up. What precisely this requires is left to the implementation of the network managing service.
https://www.freedesktop.org/software/systemd/man/systemd.special.htmlhttps://lists.kamailio.org/pipermail/sr-users/2018-November/103668.html
Signed-off-by: Kevin Olbrich <ko(a)sv01.de>
---
Modified: pkg/kamailio/deb/bionic/kamailio.service
Modified: pkg/kamailio/deb/buster/kamailio.service
Modified: pkg/kamailio/deb/debian/kamailio.service
Modified: pkg/kamailio/deb/jessie/kamailio.service
Modified: pkg/kamailio/deb/sid/kamailio.service
Modified: pkg/kamailio/deb/stretch/kamailio.service
Modified: pkg/kamailio/deb/xenial/kamailio.service
---
Diff: https://github.com/kamailio/kamailio/commit/f7867838eb8a68a9ae4c00f2487bdec…
Patch: https://github.com/kamailio/kamailio/commit/f7867838eb8a68a9ae4c00f2487bdec…
---
diff --git a/pkg/kamailio/deb/bionic/kamailio.service b/pkg/kamailio/deb/bionic/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/bionic/kamailio.service
+++ b/pkg/kamailio/deb/bionic/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/buster/kamailio.service b/pkg/kamailio/deb/buster/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/buster/kamailio.service
+++ b/pkg/kamailio/deb/buster/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/debian/kamailio.service b/pkg/kamailio/deb/debian/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/debian/kamailio.service
+++ b/pkg/kamailio/deb/debian/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/jessie/kamailio.service b/pkg/kamailio/deb/jessie/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/jessie/kamailio.service
+++ b/pkg/kamailio/deb/jessie/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/sid/kamailio.service b/pkg/kamailio/deb/sid/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/sid/kamailio.service
+++ b/pkg/kamailio/deb/sid/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/stretch/kamailio.service b/pkg/kamailio/deb/stretch/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/stretch/kamailio.service
+++ b/pkg/kamailio/deb/stretch/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking
diff --git a/pkg/kamailio/deb/xenial/kamailio.service b/pkg/kamailio/deb/xenial/kamailio.service
index e7a9e18484..99679e3372 100644
--- a/pkg/kamailio/deb/xenial/kamailio.service
+++ b/pkg/kamailio/deb/xenial/kamailio.service
@@ -1,6 +1,7 @@
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
Type=forking