def tune_nofile_platform(self, num=8192, fstore=None): """ Increase the number of files descriptors available to directory server from the default 1024 to 8192. This will allow to support a greater number of clients out of the box. This is a part of the implementation that is systemd-specific. Returns False if the setting of the nofile limit needs to be skipped. """ if os.path.exists(paths.SYSCONFIG_DIRSRV_SYSTEMD): # We need to enable LimitNOFILE=8192 in the [email protected] # Since 389-ds-base-1.2.10-0.8.a7 the configuration of the # service parameters is performed via # /etc/sysconfig/dirsrv.systemd file which is imported by systemd # into [email protected] unit replacevars = {'LimitNOFILE': str(num)} ipautil.inifile_replace_variables(paths.SYSCONFIG_DIRSRV_SYSTEMD, 'service', replacevars=replacevars) tasks.restore_context(paths.SYSCONFIG_DIRSRV_SYSTEMD) ipautil.run(["/bin/systemctl", "--system", "daemon-reload"], raiseonerr=False) return True
def tune_nofile_platform(self, num=8192, fstore=None): """ Increase the number of files descriptors available to directory server from the default 1024 to 8192. This will allow to support a greater number of clients out of the box. This is a part of the implementation that is systemd-specific. Returns False if the setting of the nofile limit needs to be skipped. """ if os.path.exists(paths.SYSCONFIG_DIRSRV_SYSTEMD): # We need to enable LimitNOFILE=8192 in the [email protected] # Since 389-ds-base-1.2.10-0.8.a7 the configuration of the # service parameters is performed via # /etc/sysconfig/dirsrv.systemd file which is imported by systemd # into [email protected] unit replacevars = {'LimitNOFILE': str(num)} ipautil.inifile_replace_variables(paths.SYSCONFIG_DIRSRV_SYSTEMD, 'service', replacevars=replacevars) tasks.restore_context(paths.SYSCONFIG_DIRSRV_SYSTEMD) ipautil.run(["/bin/systemctl", "--system", "daemon-reload"], raiseonerr=False) return True
def enable(self, instance_name=""): super(Fedora16DirectoryService, self).enable(instance_name) dirsrv_systemd = "/etc/sysconfig/dirsrv.systemd" if os.path.exists(dirsrv_systemd): # We need to enable LimitNOFILE=8192 in the [email protected] # Since 389-ds-base-1.2.10-0.8.a7 the configuration of the # service parameters is performed via # /etc/sysconfig/dirsrv.systemd file which is imported by systemd # into [email protected] unit replacevars = {'LimitNOFILE':'8192'} ipautil.inifile_replace_variables(dirsrv_systemd, 'service', replacevars=replacevars) restore_context(dirsrv_systemd) ipautil.run(["/bin/systemctl", "--system", "daemon-reload"],raiseonerr=False)