extended provision-backend

Oliver Liebel oliver at itc.li
Thu Aug 6 17:48:16 MDT 2009



Andrew Bartlett schrieb:
> On Fri, 2009-08-07 at 01:09 +0200, Oliver Liebel wrote:
>   
>> Andrew Bartlett schrieb:
>>     
>>> On Thu, 2009-08-06 at 13:58 +0200, Oliver Liebel wrote:
>>>   
>>>       
>>>> Andrew Bartlett schrieb:
>>>>     
>>>>         
>>>>>       
>>>>> Thank-you so much for this work.  I've been thinking about it, and the
>>>>> main thing I dislike is the way you try to detect another slapd process
>>>>> using ps and grep.  Instead, how about trying a rootDSE search against
>>>>> the ldapi socket?  
>>>>>       
>>>>>           
>>>> what about a simple bind via python-ldap to the socket?
>>>> that should do it too.
>>>> tested ist, seems ok.
>>>>     
>>>>         
>>> That would work.  However I would prefer to use the ldb bindings if
>>> possible.  See the Ldb module. 
>>>
>>> (not that I think using python-ldap would be a big extra burden in terms
>>> of dependences, but because it means a future maintainer of the script
>>> would not have to learn another module and pattern). 
>>>
>>> Andrew Bartlett
>>>   
>>>       
>> hi andrew,
>> here is the second (and hopefully...) final edition.
>>     
>
> Good, but don't go around killing processes until you have confirmed
> that it's actually listening on the port.  (The pid file could be left
> around, and another process could have that pid)
>   
> I would really prefer not to do the kill at all - perhaps just print out
> what PID we think is still listening there.  That is: do the ldap search
> test first.
>   
that should be fixed quick.
first ldapsearch, then check if slapd-"provision"-pid == slapd.pid, then 
kill. ok.

> Also, if you could try and use the Ldb module, 
thats matter of time. next weeks i have very limited time.
what about that: ill fix the "kill"-order, and we put the improvements
(with python-ldap) into the next alpha, so that we can get more 
testing-feedback.
functionality should be ok, i have verified it several times with all 
setup-types.

we could handle the change from python-ldap to ldb transparently to the 
users
in the next evolution step, when both scripts are merged.
> it would be more
> consistent (error handling etc) with the rest of Samba.
>
> Thanks!
>
>
> Andrew Bartlett
>
>   


More information about the samba-technical mailing list