Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-10-18 Thread Victor Seva
Closed #1889.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1889#event-2724031965___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-10-18 Thread Victor Seva
ac21d494253eddd085197e2862c3206efff8233a
0436af5abd8b73e17f65020c74943f0f3b72ba0d

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1889#issuecomment-543603687___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-10-18 Thread Juha Heinanen
sergey-safarov writes:

> Now unit contains
> ```
> RuntimeDirectory=kamailio
> ```
...
> Look as current definition correct

Yes, RuntimeDirectory is correct, but not this:

PIDFile=/var/run/kamailio/kamailio.pid

since it hardwires /var/run rather than using $RUNTIME_DIRECTORY.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-10-18 Thread sergey-safarov
Now unit contains
```
RuntimeDirectory=kamailio
```
According docs

> The specified directory names must be relative, and may not include "..". If 
> set, one or more directories by the specified names will be created 
> (including their parents) below the locations defined in the following table, 
> when the unit is started.

According table base patch  for relative directory is `/run` (`Below path for 
system units` column).

Look as current definition correct 

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1889#issuecomment-543568520___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-10-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> Does this one still needs to be addressed, or are we fine with the
> version included in the deb/rpm packages right now?

It works right now (with the syslog message), but according systemd
documentation, the dir is /run, not /var/run:

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=

Perhaps the best would be to use $RUNTIME_DIRECTORY environment var.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-06-14 Thread Daniel-Constantin Mierla
@linuxmaniac - any conclusion this one?

-- 
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/1889#issuecomment-502051473___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-05-20 Thread sergey-safarov
sergey-safarov commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple

yes, that is determines how to monitor kamailio process.
I suggest to start kamailio with `-DD`  option.
In this case kamailio main process control own child's, and systemd monitors 
only kamailio main process.

-- 
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/1889#discussion_r285634719___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-05-20 Thread Sam
verticelo commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple

But, doesn't this determine how systemd monitors the process after the process 
has started, ie. if the kamailio process forks or not?

-- 
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/1889#discussion_r285580801___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-05-20 Thread sergey-safarov
I ready to squash and update commit after review.

-- 
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/1889#issuecomment-493893761___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-05-20 Thread Daniel-Constantin Mierla
@linuxmaniac - these changes are on systemd unit for debian packaging. Any 
conclusion on what to do with this PR?

If decided to merge, quash in a single commit and set a proper formatted commit 
message, because now the commits do not follow the rules.

-- 
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/1889#issuecomment-493867087___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-26 Thread sergey-safarov
@mckaygerhard your reference not relevant to systemd.

-- 
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/1889#issuecomment-476939250___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-26 Thread PICCORO Lenz McKAY
seems systemd made more problems thatn solves 
https://github.com/kamailio/kamailio/issues/1898

-- 
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/1889#issuecomment-476850632___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-22 Thread sergey-safarov
sergey-safarov commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple

This systemd setting not kamailio process.
Interactions is not exist. 

-- 
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/1889#discussion_r268146117___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-22 Thread sergey-safarov
sergey-safarov commented on this pull request.



>  # ExecStart requires a full absolute path
-ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m 
$SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP
+ExecStart=/usr/sbin/kamailio -DD -P /var/run/kamailio/kamailio.pid -f $CFGFILE 
-m $SHM_MEMORY -M $PKG_MEMORY

I did not observe the influence

-- 
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/1889#discussion_r268145365___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-22 Thread Sam
verticelo commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple

How will this interact with the default setting of fork=yes in the config?

>  # ExecStart requires a full absolute path
-ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m 
$SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP
+ExecStart=/usr/sbin/kamailio -DD -P /var/run/kamailio/kamailio.pid -f $CFGFILE 
-m $SHM_MEMORY -M $PKG_MEMORY

Changing to this mode, will it have any impact on performance of Kamailio? If 
so, in what direction?

-- 
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/1889#pullrequestreview-217657580___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-12 Thread sergey-safarov
sergey-safarov commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple
+User=kamailio

`there's a way to pass the user and group from environment or invoke command?`
Please look d3cc4e4c10820e538e7cc73b839140e38df09756
kamailio default have complete description how to change user/group of kamailio 
process.

-- 
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/1889#discussion_r264652339___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-12 Thread sergey-safarov
sergey-safarov commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple
+User=kamailio

To change username at runtime need place drop-in into 
`/run/systemd/system/kamailio.service.d` directory and apply changes by 
`systemctl daemon-reload`
For dynamic unit updates you cannot use 
`/etc/systemd/system/kamailio.service.d` directory.

Also you can use [service 
templates](https://fedoramagazine.org/systemd-template-unit-files/)
 

-- 
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/1889#discussion_r264651186___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Systemd unit update (#1889)

2019-03-12 Thread PICCORO Lenz McKAY
mckaygerhard commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple
+User=kamailio

Hi!, thanks for this pull request.. finally after many fights and ignored 
mails, but now a small request (if it can be done): there's a way to pass the 
user and group from environment or invoke command? i mean for packaging.. in 
debian exits the /etc/default/kamailio file that set user and group...

-- 
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/1889#pullrequestreview-213343278___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev