[Kolab-devel] [PATCH 1/2] Close existing slapd instances before launching 389 setup

Francesco Frassinelli fraph24 at gmail.com
Mon Sep 9 23:13:59 CEST 2013


Hi Jeroen,
thanks for your mail.
It would be nice to stop slapd before trying to configure and starting it
another time. I proposed those two patches because I had some troubles
restarting Kolab setup after something went wrong.
I don't know if the best way to mitigate this issue is trying to add some
code to Kolab setup: maybe you prefer to create a different tool for
uninstalling or just adding a special option (like --reinstall).


Kind regards,
Francesco Frassinelli


2013/9/9 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>

> Hi Francesco,
>
> slapd_pid_file is actually under /var/run/dirsrv/ only most of the time
> (for those that have not switched to /run tmpfs yet), and I would think
> that the name of 'slapd-kolab.pid' is actually subject to the instance name
> for any given dirsrv instance.
>
>
> On 2013-08-03 19:33, Francesco Frassinelli wrote:
>
>> ---
>>  pykolab/setup/setup_ldap.py | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
>> index b54fb55..5d97bf2 100644
>> --- a/pykolab/setup/setup_ldap.py
>> +++ b/pykolab/setup/setup_ldap.py
>> @@ -341,6 +341,13 @@ ServerAdminPwd = %(admin_pass)s
>>
>>      log.info(_("Setting up 389 Directory Server"))
>>
>> +    # Close existing instances
>> +    slapd_pid_file = '/var/run/dirsrv/slapd-kolab.**pid'
>> +    if os.path.exists(slapd_pid_file)**:
>> +        with open(slapd_pid_file, 'r') as slapd_pid:
>> +            subprocess.Popen(['kill', slapd_pid.read().rstrip()])
>> +        time.sleep(5)
>> +
>>      setup_389 = subprocess.Popen(
>>              command,
>>              stdout=subprocess.PIPE,
>>
>
> Kind regards,
>
> Jeroen van Meeuwen
>
> --
> Systems Architect, Kolab Systems AG
>
> e: vanmeeuwen at kolabsys.com
> m: +44 74 2516 3817
> w: http://www.kolabsys.com
>
> pgp: 9342 BF08
> ______________________________**_________________
> devel mailing list
> devel at lists.kolab.org
> https://lists.kolab.org/**mailman/listinfo/devel<https://lists.kolab.org/mailman/listinfo/devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/devel/attachments/20130909/c6cddc91/attachment.html>


More information about the devel mailing list