On Thu, 2013-08-22 at 17:23 +0200, Tomas Babej wrote:
> On 08/20/2013 06:40 PM, Nathaniel McCallum wrote:
> > On Mon, 2013-08-19 at 14:48 +0200, Tomas Babej wrote:
> >> Hi,
> >>
> >> When configuring the 389 Directory Server instance, we tune it
> >> so that number of file descriptors available to the DS is increased
> >> from the default 1024 to 8192.
> >>
> >> There are platform specific steps that need to be conducted
> >> differently on systemd compatible platforms and sysV compatible
> >> platforms.
> >>
> >> systemd: set LimitNOFILE to 8192 in /etc/sysconfig/dirsrv.systemd
> >> sysV: set ulimit -n 8192 in /etc/sysconfig/dirsrv
> >>         set ulimit - nofile 8192 in /etc/security/limits.conf
> >>
> >> https://fedorahosted.org/freeipa/ticket/3823
> > I'd prefer the use of 'with' in the RedHatDirectoryService:
> > # check limits.conf
> > need_limits = True
> > with open("/etc/security/limits.conf") as f:
> >    for line in f:
> >        sline = line.strip()
> >        if not sline.startswith(DS_USER):
> >            continue
> >        if sline.find('nofile') == -1:
> >            continue
> >        # ok we already have an explicit entry for user/nofile
> >        need_limits = False
> >
> > ... and ...
> >
> > with open("/etc/sysconfig/dirsrv", "a+") as f:
> >      f.write('ulimit -n %s\n' % str(num))
> >
> > Nathaniel
> >
> Fixed and I did some additional refactoring in the code.
> 
> Attached.

ACK


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to