On 01/23/2012 07:37 AM, Alexander Bokovoy wrote:
On Mon, 23 Jan 2012, Simo Sorce wrote:
On Mon, 2012-01-23 at 08:03 +0200, Alexander Bokovoy wrote:
On Sun, 22 Jan 2012, Simo Sorce wrote:
Shouldn't we just 'include' the original file and not copy it ?
If we include it a change in the file will be automatically picked up.
We can't due to systemd design and use of it in 389-ds.

LimitNOFILE needs to be changed in the service file directly, not in
the environment file in /etc/sysconfig or otherwise it will not be
picked up by the systemd.
I am not talking about using /set/sysconfig options, but the .include
directive for service files.
So, something like this for 389-ds?
No, you should include the actual dirsrv default service file (if any,
otherwise the sysconfig one might be ok I guess).
There is /lib/systemd/system/dirsrv@.service. The content below is
from there and I think there is no need to make .include in a
/etc/systemd/system/dirsrv@.service copy of it as we can ask Rich to
make proper change in the original service unit.

This way we only would have settings in /etc/sysconfig (or in
/etc/dirsrv if that's better) and you'd have no need to intervene into
/etc/systemd/system. Paths are irrelevant but I'd prefer to use common
places like /etc/sysconfig.
I have filed this ticket https://fedorahosted.org/freeipa/ticket/2300

What changes do I need to make to 389?
Description=389 Directory Server %i.

ExecStart=/usr/sbin/ns-slapd -D /etc/dirsrv/slapd-%i -i ${PIDDIR}/slapd-%i.pid 
-w ${PIDDIR}/slapd-%i.startpid
.include /etc/sysconfig/dirsrv.systemd

and then with following /etc/sysconfig/dirsrv.systemd:

local overrides can be created?
Yes I think if you put directives after the include they will override
whatever is in the include.
Depends on directive.

Also I would put as much as possible in the include file and put in the
specific instance files only the parameters we need to override.
There is no specific instance service unit. There is one service unit
that processes all instances, that's the whole purpose of @-services

It seems to work. You can't use %i macro in .include unfortunately so
any configuration change will be global, not per service instance.
That's fine we want to put in there only global configuration anyways,
and then override in our specific per instance control files.
See above. There are no per-instance control files.

Freeipa-devel mailing list

Reply via email to