extended provision-backend

Andrew Bartlett abartlet at samba.org
Fri Aug 7 03:00:21 MDT 2009


On Fri, 2009-08-07 at 10:55 +0200, Oliver Liebel wrote:
> Andrew Bartlett schrieb:
> > On Fri, 2009-08-07 at 10:20 +0200, Oliver Liebel wrote:
> >   
> >> Andrew Bartlett schrieb:
> >>     
> >>> On Fri, 2009-08-07 at 10:16 +1000, Andrew Bartlett wrote:
> >>>   
> >>>       
> >>>> On Fri, 2009-08-07 at 01:48 +0200, Oliver Liebel wrote:
> >>>>     
> >>>>         
> >>>>>> 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.
> >>>>>       
> >>>>>           
> >>>> I'm not sure how you intend to check the PID, but as I said, I would
> >>>> prefer not to kill in the script, just print the PID. 
> >>>>     
> >>>>         
> >>> I've now read the patch more carefully.  This seems like a great
> >>> approach!
> >>>   
> >>>       
> >> thanks. please tell me how you want to handle it:
> >> just check the pid an print out, so the admin has to kill it self?
> >> (e.g. "provision finished. slapd-provison-process with pid 12345 must
> >> be terminated now. you should verify, that this is the correct pid
> >> before you kill it.")
> >> this would leave the responsibility to the admin.
> >>     
> >
> > I was unclear and confused:  This is what I want:
> >
> > When we start a provision-backend, we look to see if a slapd is already
> > listening on the ldapi socket, before we start a new slapd to listen
> > there. 
> this operation is alread implemented, tested and verified(by
> rootDSE-search) in the new patch.
> >  In this case we print the presumed PID of the old slapd that is
> > in our way and abort.
> >   
> hm.. how can we get this, as the process is not started by our
> python-script?

The slapd.pid file in the same directory as the ldapi socket. 

This is where a properly configured slapd will put the PID (and this is
the most likely case for something to still be bound to the ldapi socket
- properly configured, but not properly shut down). 
  
> thank you very much!
> i call on you if i got some more questions.

No worries.  Thanks!

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090807/feb763f5/attachment.pgp>


More information about the samba-technical mailing list